annotate runtime/syntax/datascript.vim @ 8532:3de84783c029 v7.4.1556

commit https://github.com/vim/vim/commit/a3442cb5056ca62fc71fa03f68a9395e4391caf4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 13 14:34:12 2016 +0100 patch 7.4.1556 Problem: "make install" changes the help tags file, causing it to differ from the repository. Solution: Move it aside and restore it.
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Mar 2016 14:45:04 +0100
parents 349e6c01f35d
children 43efa4f5a8ea
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
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
2 " Language: DataScript
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
4 " Last Change: 2015 Jul 30
2467
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:
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
8 "
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
9 " http://dstools.sourceforge.net/DataScriptLanguageOverview.html
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 if version < 600
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 syntax clear
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 elseif exists("b:current_syntax")
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 finish
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 endif
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2467
diff changeset
16 let s:keepcpo= &cpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2467
diff changeset
17 set cpo&vim
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn keyword dsPackage import package
5763
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
20 syn keyword dsType bit bool string
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
21 syn keyword dsType int int8 int16 int32 int64
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 syn keyword dsType uint8 uint16 uint32 uint64
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
23 syn keyword dsType varint16 varint32 varint64
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
24 syn keyword dsType varuint16 varuint32 varuint64
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 syn keyword dsType leint16 leint32 leint64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 syn keyword dsType leuint16 leuint32 leuint64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn keyword dsEndian little big
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn keyword dsAlign align
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn keyword dsLabel case default
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 syn keyword dsConditional if condition
5763
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
31 syn keyword dsBoolean true false
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
32 syn keyword dsCompound union choice on enum bitmask subtype explicit
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn keyword dsKeyword function return
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 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
35 syn keyword dsStorageClass const
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 syn keyword dsTodo contained TODO FIXME XXX
5763
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
37 syn keyword dsSql sql sql_table sql_database sql_pragma sql_index
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
38 syn keyword dsSql sql_integer sql_metadata sql_key sql_virtual
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
39 syn keyword dsSql using reference_key foreign_key to
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 " dsCommentGroup allows adding matches for special things in comments.
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn cluster dsCommentGroup contains=dsTodo
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 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
45
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match dsNumber display "\<\d\+\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syn match dsNumberHex display "\<0[xX]\x\+\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 syn match dsNumberBin display "\<[01]\+[bB]\>" contains=dsBinaryB
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 syn match dsBinaryB display contained "[bB]\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 syn match dsOctal display "\<0\o\+\>" contains=dsOctalZero
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syn match dsOctalZero display contained "\<0"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 syn match dsOctalError display "\<0\o*[89]\d*\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 syn match dsCommentError display "\*/"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 syn match dsCommentStartError display "/\*"me=e-1 contained
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 dsCommentL
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 \ start="//" skip="\\$" end="$" keepend
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 \ contains=@dsCommentGroup,@Spell
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 syn region dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 \ matchgroup=dsCommentStart start="/\*" end="\*/"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 \ contains=@dsCommentGroup,dsCommentStartError,@Spell extend
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 syn region dsString
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
7013
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
68 syn sync ccomment dsComment
349e6c01f35d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5763
diff changeset
69
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 " Define the default highlighting.
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 hi def link dsType Type
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 hi def link dsEndian StorageClass
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 hi def link dsStorageClass StorageClass
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 hi def link dsAlign Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 hi def link dsLabel Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 hi def link dsOffset Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 hi def link dsSql PreProc
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 hi def link dsCompound Structure
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 hi def link dsConditional Conditional
5763
c52a655d927d Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
80 hi def link dsBoolean Boolean
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 hi def link dsKeyword Statement
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 hi def link dsString String
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 hi def link dsNumber Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 hi def link dsNumberBin Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 hi def link dsBinaryB Special
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 hi def link dsOctal Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 hi def link dsOctalZero Special
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 hi def link dsOctalError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 hi def link dsNumberHex Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 hi def link dsTodo Todo
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 hi def link dsOperator Operator
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 hi def link dsPackage Include
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 hi def link dsCommentError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 hi def link dsCommentStartError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 hi def link dsCommentStart dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 hi def link dsCommentL dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 hi def link cCommentL dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 hi def link dsComment Comment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 let b:current_syntax = "datascript"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2467
diff changeset
101
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2467
diff changeset
102 let &cpo = s:keepcpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2467
diff changeset
103 unlet s:keepcpo