annotate runtime/syntax/racc.vim @ 375:f14cbd913415 v7.0097

updated for version 7.0097
author vimboss
date Wed, 29 Jun 2005 22:40:58 +0000
parents
children 4fe8e1a7758e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
1 " Vim default file
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
2 " Language: Racc input file
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
3 " Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
4 " Latest Revision: 2005-06-29
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
5
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
6 if exists("b:current_syntax")
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
7 finish
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
8 endif
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
9
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
10 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
11 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
12
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
13 syn keyword raccTodo contained TODO FIXME XXX NOTE
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
14
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
15 syn region raccComment matchgroup=raccComment start='/\*' end='\*/'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
16 \ contains=raccTodo,@Spell
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
17 syn region raccComment matchgroup=raccComment start='#' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
18 \ contains=raccTodo,@Spell
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
19
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
20 syn region raccClass transparent matchgroup=raccKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
21 \ start='\<class\>' end='\<rule\>'he=e-4
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
22 \ contains=raccComment,raccPrecedence,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
23 \ raccTokenDecl,raccExpect,raccOptions,raccConvert,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
24 \ raccStart,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
25
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
26 syn region raccPrecedence transparent matchgroup=raccKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
27 \ start='\<prechigh\>' end='\<preclow\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
28 \ contains=raccComment,raccPrecSpec
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
29
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
30 syn keyword raccPrecSpec contained nonassoc left right
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
31 \ nextgroup=raccPrecToken,raccPrecString skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
32 \ skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
33
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
34 syn match raccPrecToken contained '\<\u[A-Z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
35 \ nextgroup=raccPrecToken,raccPrecString skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
36 \ skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
37
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
38 syn region raccPrecString matchgroup=raccPrecString start=+"+
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
39 \ skip=+\\\\\|\\"+ end=+"+
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
40 \ contains=raccSpecial
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
41 \ nextgroup=raccPrecToken,raccPrecString skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
42 \ skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
43 syn region raccPrecString matchgroup=raccPrecString start=+'+
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
44 \ skip=+\\\\\|\\'+ end=+'+ contains=raccSpecial
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
45 \ nextgroup=raccPrecToken,raccPrecString skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
46 \ skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
47
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
48 syn keyword raccTokenDecl contained token
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
49 \ nextgroup=raccTokenR skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
50
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
51 syn match raccTokenR contained '\<\u[A-Z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
52 \ nextgroup=raccTokenR skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
53
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
54 syn keyword raccExpect contained expect
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
55 \ nextgroup=raccNumber skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
56
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
57 syn match raccNumber contained '\<\d\+\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
58
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
59 syn keyword raccOptions contained options
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
60 \ nextgroup=raccOptionsR skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
61
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
62 syn keyword raccOptionsR contained omit_action_call result_var
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
63 \ nextgroup=raccOptionsR skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
64
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
65 syn region raccConvert transparent contained matchgroup=raccKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
66 \ start='\<convert\>' end='\<end\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
67 \ contains=raccComment,raccConvToken skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
68 \ skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
69
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
70 syn match raccConvToken contained '\<\u[A-Z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
71 \ nextgroup=raccString skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
72
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
73 syn keyword raccStart contained start
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
74 \ nextgroup=raccTargetS skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
75
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
76 syn match raccTargetS contained '\<\l[a-z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
77
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
78 syn match raccSpecial contained '\\["'\\]'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
79
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
80 syn region raccString matchgroup=raccString start=+"+ skip=+\\\\\|\\"+
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
81 \ end=+"+ contains=raccSpecial
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
82 syn region raccString matchgroup=raccString start=+'+ skip=+\\\\\|\\'+
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
83 \ end=+'+ contains=raccSpecial
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
84
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
85 syn region raccRules transparent matchgroup=raccKeyword start='\<rule\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
86 \ end='\<end\>' contains=raccComment,raccString,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
87 \ raccNumber,raccToken,raccTarget,raccDelimiter,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
88 \ raccAction
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
89
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
90 syn match raccTarget contained '\<\l[a-z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
91
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
92 syn match raccDelimiter contained '[:|]'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
93
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
94 syn match raccToken contained '\<\u[A-Z0-9]*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
95
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
96 syn include @raccRuby syntax/ruby.vim
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
97
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
98 syn region raccAction transparent matchgroup=raccDelimiter
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
99 \ start='{' end='}' contains=@raccRuby
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
100
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
101 syn region raccHeader transparent matchgroup=raccPreProc
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
102 \ start='^---- header.*' end='^----'he=e-4
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
103 \ contains=@raccRuby
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
104
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
105 syn region raccInner transparent matchgroup=raccPreProc
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
106 \ start='^---- inner.*' end='^----'he=e-4
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
107 \ contains=@raccRuby
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
108
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
109 syn region raccFooter transparent matchgroup=raccPreProc
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
110 \ start='^---- footer.*' end='^----'he=e-4
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
111 \ contains=@raccRuby
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
112
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
113 hi def link raccTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
114 hi def link raccComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
115 hi def link raccPrecSpec Type
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
116 hi def link raccPrecToken raccToken
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
117 hi def link raccPrecString raccString
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
118 hi def link raccTokenDecl Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
119 hi def link raccToken Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
120 hi def link raccTokenR raccToken
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
121 hi def link raccExpect Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
122 hi def link raccNumber Number
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
123 hi def link raccOptions Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
124 hi def link raccOptionsR Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
125 hi def link raccConvToken raccToken
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
126 hi def link raccStart Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
127 hi def link raccTargetS Type
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
128 hi def link raccSpecial special
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
129 hi def link raccString String
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
130 hi def link raccTarget Type
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
131 hi def link raccDelimiter Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
132 hi def link raccPreProc PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
133 hi def link raccKeyword Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
134
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
135 let b:current_syntax = "racc"
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
136
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
137 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
138 unlet s:cpo_save