File: capnproto.xml

package info (click to toggle)
kf6-syntax-highlighting 6.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,872 kB
  • sloc: xml: 205,656; cpp: 12,882; python: 3,055; sh: 965; perl: 814; ruby: 494; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; exp: 61; erlang: 54; sql: 51; java: 47; sed: 45; objc: 37; tcl: 36; awk: 31; asm: 30; fortran: 18; cs: 10
file content (271 lines) | stat: -rw-r--r-- 10,872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language[
  <!ENTITY escape_str "\\(x[[:xdigit:]]{2}|[0-7]{1,3}|[abfnrtv\\'&quot;])">
]>
<!-- https://capnproto.org/language.html -->
<language name="Cap'n Proto" section="Sources"
  version="1" kateversion="5.79"
  indenter="cstyle"
  extensions="*.capnp"
  author="Jonathan Poelen (jonathan.poelen@gmail.com)"
  license="MIT">
<highlighting>

<list name="keyword">
  <item>annotation</item>
  <item>const</item>
  <item>enum</item>
  <item>extends</item>
  <item>import</item>
  <item>interface</item>
  <item>struct</item>
  <item>union</item>
  <item>using</item>
</list>

<list name="type">
  <item>Void</item>
  <item>Bool</item>
  <item>Int8</item>
  <item>Int16</item>
  <item>Int32</item>
  <item>Int64</item>
  <item>UInt8</item>
  <item>UInt16</item>
  <item>UInt32</item>
  <item>UInt64</item>
  <item>Float32</item>
  <item>Float64</item>
  <item>Text</item>
  <item>Data</item>
  <item>List</item>

  <item>union</item>
  <item>group</item>

  <item>AnyPointer</item>
</list>

<contexts>
  <context name="Normal" attribute="Normal Text">
    <DetectSpaces/>
    <AnyChar String=",;" attribute="Separator Symbol"/>
    <AnyChar String="[]()->" attribute="Symbol"/>
    <HlCHex attribute="Id" context="CheckInvalidSuffix" additionalDeliminator="@"/>
    <Int attribute="Id" context="CheckInvalidSuffix" additionalDeliminator="@"/>
    <DetectChar char="@" attribute="Id"/>
    <DetectChar char=":" attribute="Type Symbol" context="Type"/>
    <DetectChar char="=" attribute="Field Assignement" context="Value"/>
    <DetectChar char="#" attribute="Comment" context="Comment"/>
    <DetectChar char="$" attribute="Annotation Symbol" context="Annotation"/>
    <DetectChar char="{" attribute="Block Symbol" beginRegion="Brace1"/>
    <DetectChar char="}" attribute="Block Symbol" endRegion="Brace1"/>
    <keyword String="keyword" attribute="Keyword"/>
    <DetectIdentifier/>
  </context>

  <!-- Type @{ -->
  <context name="Type" attribute="Type">
    <AnyChar String="{};:=$)," context="#pop" lookAhead="1"/>
    <IncludeRules context="FindCommonType"/>
  </context>

  <context name="ParenType" attribute="Type">
    <DetectChar char=")" attribute="Type" context="#pop"/>
    <AnyChar String="{};" context="#pop#pop" lookAhead="1"/>
    <IncludeRules context="FindCommonType"/>
    <DetectSpaces attribute="Type"/>
  </context>

  <context name="FindCommonType" attribute="Type">
    <DetectChar char="(" attribute="Type" context="ParenType"/>
    <DetectChar char='"' attribute="String Type" context="TypeDQ"/>
    <DetectChar char="'" attribute="String Type" context="TypeSQ"/>
    <DetectChar char="#" attribute="Comment" context="Comment"/>
    <keyword String="type" attribute="Built-in Type"/>
    <DetectIdentifier attribute="Type"/>
  </context>

  <context name="TypeDQ" attribute="Type" lineEndContext="#pop">
    <DetectChar char='"' attribute="String Type" context="#pop"/>
    <DetectChar char="\" context="EscapeTypeQ" lookAhead="1"/>
  </context>

  <context name="TypeSQ" attribute="Type" lineEndContext="#pop">
    <DetectChar char="'" attribute="String Type" context="#pop"/>
    <DetectChar char="\" context="EscapeTypeQ" lookAhead="1"/>
  </context>

  <context name="EscapeTypeQ" attribute="Type" lineEndContext="#pop">
    <RegExpr String="&escape_str;" attribute="String Type Char" context="#pop"/>
    <IncludeRules context="InvalidEscapeString"/>
  </context>
  <!-- Type @} -->


  <!-- Value @{ -->
  <context name="Value" attribute="Value">
    <AnyChar context="#pop" String="{};:$)," lookAhead="1"/>
    <IncludeRules context="FindCommonValue"/>
  </context>

  <context name="ParenValue" attribute="Value">
    <AnyChar String="])" attribute="Symbol" context="#pop"/>
    <AnyChar context="#pop#pop" String="{};" lookAhead="1"/>
    <IncludeRules context="FindCommonValue"/>
  </context>

  <context name="FindCommonValue" attribute="Value">
    <DetectSpaces attribute="Value"/>
    <AnyChar String="0123456789" context="Number" lookAhead="1"/>
    <AnyChar String="([" attribute="Symbol" context="ParenValue"/>
    <DetectChar char="-" attribute="Operator"/>
    <DetectChar char="=" attribute="Value Assignement"/>
    <DetectChar char='"' attribute="String" context="StringDQ"/>
    <DetectChar char="'" attribute="String" context="StringSQ"/>
    <DetectChar char="#" attribute="Comment" context="Comment"/>
    <DetectChar char="," attribute="Separator Symbol"/>
    <WordDetect String="nan" attribute="Number"/>
    <WordDetect String="inf" attribute="Number"/>
    <WordDetect String="true" attribute="Constant"/>
    <WordDetect String="false" attribute="Constant"/>
    <DetectIdentifier attribute="Value"/>
  </context>
  <!-- Value @} -->


  <!-- String @{ -->
  <context name="StringDQ" attribute="String" lineEndContext="#pop">
    <DetectChar char='"' attribute="String" context="#pop"/>
    <DetectChar char="\" context="EscapeString" lookAhead="1"/>
  </context>

  <context name="StringSQ" attribute="String" lineEndContext="#pop">
    <DetectChar char="'" attribute="String" context="#pop"/>
    <DetectChar char="\" context="EscapeString" lookAhead="1"/>
  </context>

  <context name="EscapeString" attribute="String" lineEndContext="#pop">
    <RegExpr String="&escape_str;" attribute="String Char" context="#pop"/>
    <IncludeRules context="InvalidEscapeString"/>
  </context>
  <!-- String @} -->


  <!-- Number @{ -->
  <context name="Number" attribute="Number">
    <StringDetect String="0x" attribute="Number Prefix" context="Hex"/>
    <WordDetect String="0" attribute="Number" context="#pop"
                additionalDeliminator="@$'&quot;"/>
    <!-- .2 is an invalid float -->
    <RegExpr String="[0-9]+([.][0-9]*([eE][-+]?[0-9]+)?|[eE][-+]?[0-9]+)|[1-9][0-9]*"
              attribute="Number" context="CheckInvalidSuffix"/>
    <DetectChar char="0" attribute="Number Prefix" context="Oct"/>
  </context>

  <context name="Hex" attribute="Number" fallthroughContext="#pop!CheckInvalidSuffix">
    <AnyChar String="0123456789abcdefABCDEF" attribute="Number"/>
  </context>

  <context name="Oct" attribute="Number" fallthroughContext="#pop!CheckInvalidSuffix">
    <AnyChar String="01234567" attribute="Number"/>
  </context>

  <context name="CheckInvalidSuffix" attribute="Error" fallthroughContext="#pop#pop">
    <DetectIdentifier attribute="Error"/>
    <AnyChar String="0123456789" attribute="Error"/>
  </context>
  <!-- Number @} -->


  <!-- Annotation @{ -->
  <context name="Annotation" attribute="Annotation">
    <AnyChar String="{};:=$)," context="#pop" lookAhead="1"/>
    <IncludeRules context="FindCommonAnnotation"/>
  </context>

  <context name="ParenAnnotation" attribute="Annotation">
    <AnyChar context="#pop#pop" String="{};" lookAhead="1"/>
    <DetectChar char=")" attribute="Annotation" context="#pop"/>
    <IncludeRules context="FindCommonAnnotation"/>
  </context>

  <context name="FindCommonAnnotation" attribute="Annotation">
    <DetectChar char="#" attribute="Comment" context="Comment"/>
    <DetectChar char="(" attribute="Annotation" context="ParenAnnotation"/>
    <DetectChar char='"' attribute="String Annotation" context="AnnotationDQ"/>
    <DetectChar char="'" attribute="String Annotation" context="AnnotationSQ"/>
    <DetectIdentifier attribute="Annotation"/>
    <DetectSpaces attribute="Annotation"/>
  </context>

  <context name="AnnotationDQ" attribute="Annotation" lineEndContext="#pop">
    <DetectChar char='"' attribute="String Annotation" context="#pop"/>
    <DetectChar char="\" context="EscapeAnnotationQ" lookAhead="1"/>
  </context>

  <context name="AnnotationSQ" attribute="Annotation" lineEndContext="#pop">
    <DetectChar char="'" attribute="String Annotation" context="#pop"/>
    <DetectChar char="\" context="EscapeAnnotationQ" lookAhead="1"/>
  </context>

  <context name="EscapeAnnotationQ" attribute="Annotation" lineEndContext="#pop">
    <RegExpr String="&escape_str;" attribute="String Annotation Char" context="#pop"/>
    <IncludeRules context="InvalidEscapeString"/>
  </context>
  <!-- Annotation @} -->


  <context name="InvalidEscapeString" attribute="Type" lineEndContext="#pop">
    <RegExpr String="\\(x[[:xdigit:]]?|[0-7]+)?" attribute="Error" context="#pop"/>
  </context>

  <context attribute="Comment" lineEndContext="#pop" name="Comment">
    <DetectSpaces/>
    <IncludeRules context="##Comments"/>
    <DetectIdentifier/>
  </context>

</contexts>
<itemDatas>
  <itemData name="Normal Text"    defStyleNum="dsNormal" spellChecking="false"/>
  <itemData name="Comment"        defStyleNum="dsComment"/>
  <itemData name="Error"          defStyleNum="dsError" spellChecking="false"/>
  <itemData name="Keyword"        defStyleNum="dsKeyword" spellChecking="false"/>
  <itemData name="Id"             defStyleNum="dsFunction" spellChecking="false"/>
  <itemData name="Field Assignement" defStyleNum="dsOperator" spellChecking="false"/>

  <itemData name="Value"          defStyleNum="dsVariable" spellChecking="false"/>
  <itemData name="Value Assignement" defStyleNum="dsAttribute" spellChecking="false"/>
  <itemData name="Operator"       defStyleNum="dsPreprocessor" spellChecking="false"/>
  <itemData name="Number Prefix"  defStyleNum="dsDecVal" spellChecking="false" italic="1"/>
  <itemData name="Number"         defStyleNum="dsDecVal" spellChecking="false"/>
  <itemData name="Constant"       defStyleNum="dsConstant" spellChecking="false"/>
  <itemData name="String"         defStyleNum="dsString"/>
  <itemData name="String Char"    defStyleNum="dsChar" spellChecking="false"/>

  <itemData name="Type"           defStyleNum="dsDataType" spellChecking="false"/>
  <itemData name="Built-in Type"  defStyleNum="dsDataType" spellChecking="false"/>
  <itemData name="Type Symbol"    defStyleNum="dsDataType" spellChecking="false"/>
  <itemData name="String Type"    defStyleNum="dsDataType" spellChecking="false"/>
  <itemData name="String Type Char" defStyleNum="dsDataType" spellChecking="false"/>

  <itemData name="Annotation"     defStyleNum="dsInformation" spellChecking="false"/>
  <itemData name="Annotation Symbol"  defStyleNum="dsInformation" spellChecking="false"/>
  <itemData name="String Annotation"  defStyleNum="dsInformation" spellChecking="false"/>
  <itemData name="String Annotation Char" defStyleNum="dsInformation" spellChecking="false"/>

  <itemData name="Symbol"         defStyleNum="dsNormal" spellChecking="false"/>
  <itemData name="Block Symbol"   defStyleNum="dsNormal" spellChecking="false" bold="1"/>
  <itemData name="Separator Symbol" defStyleNum="dsNormal" spellChecking="false"/>
</itemDatas>

</highlighting>
<general>
  <comments>
    <comment name="singleLine" start="#"/>
  </comments>
  <keywords casesensitive="1"/>
</general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->