annotate runtime/syntax/treetop.vim @ 20319:b08c6631d3f2

Added tag v8.2.0714 for changeset 3cbcee39fc5c4d1ce0252d4dff7199be1ef783be
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 May 2020 22:30:04 +0200
parents 1218c5353e2b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 2725
diff changeset
2 " Language: Treetop
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 2725
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 2725
diff changeset
4 " Latest Revision: 2011-03-14
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 if exists("b:current_syntax")
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 finish
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 let s:cpo_save = &cpo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 set cpo&vim
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syn keyword treetopTodo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 \ contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 \ TODO
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 \ FIXME
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 \ XXX
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 \ NOTE
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 syn match treetopComment
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 \ '#.*'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 \ display
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 \ contains=treetopTodo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 syn include @treetopRuby syntax/ruby.vim
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 unlet b:current_syntax
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn keyword treetopKeyword
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 \ require
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 \ end
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn region treetopKeyword
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 \ matchgroup=treetopKeyword
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 \ start='\<\%(grammar\|include\|module\)\>\ze\s'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 \ end='$'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \ transparent
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 \ oneline
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 \ keepend
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 \ contains=@treetopRuby
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn keyword treetopKeyword
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \ rule
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \ nextgroup=treetopRuleName
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 \ skipwhite skipnl
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match treetopGrammarName
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 \ '\u\w*'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 \ contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 syn match treetopRubyModuleName
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 \ '\u\w*'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 \ contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn match treetopRuleName
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 \ '\h\w*'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 \ contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 syn region treetopString
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 \ matchgroup=treetopStringDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 \ start=+"+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 \ end=+"+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 syn region treetopString
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 \ matchgroup=treetopStringDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 \ start=+'+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 \ end=+'+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 syn region treetopCharacterClass
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 \ matchgroup=treetopCharacterClassDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 \ start=+\[+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 \ skip=+\\\]+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 \ end=+\]+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 syn region treetopRubyBlock
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 \ matchgroup=treetopRubyBlockDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 \ start=+{+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 \ end=+}+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 \ contains=@treetopRuby
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 syn region treetopSemanticPredicate
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 \ matchgroup=treetopSemanticPredicateDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 \ start=+[!&]{+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 \ end=+}+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 \ contains=@treetopRuby
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 syn region treetopSubclassDeclaration
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 \ matchgroup=treetopSubclassDeclarationDelimiter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 \ start=+<+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 \ end=+>+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 \ contains=@treetopRuby
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 syn match treetopEllipsis
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 \ +''+
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 hi def link treetopTodo Todo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 hi def link treetopComment Comment
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 hi def link treetopKeyword Keyword
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 hi def link treetopGrammarName Constant
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 hi def link treetopRubyModuleName Constant
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 hi def link treetopRuleName Identifier
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 hi def link treetopString String
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 hi def link treetopStringDelimiter treetopString
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 hi def link treetopCharacterClass treetopString
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 hi def link treetopCharacterClassDelimiter treetopCharacterClass
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 hi def link treetopRubyBlockDelimiter PreProc
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 hi def link treetopSemanticPredicateDelimiter PreProc
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 hi def link treetopSubclassDeclarationDelimiter PreProc
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 hi def link treetopEllipsis Special
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 let b:current_syntax = 'treetop'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 let &cpo = s:cpo_save
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 unlet s:cpo_save