-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnbt.xml
155 lines (146 loc) · 7.95 KB
/
snbt.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Highlighting for Minecraft’s SNBT format. -->
<language name="SNBT" section="Markup" extensions="*.snbt" version="1" kateversion="2.4">
<highlighting>
<list name="literals">
<item>true</item>
<item>false</item>
</list>
<contexts>
<context lineEndContext="#stay" name="root">
<DetectChar attribute="Braces" context="object" char="{"/>
<DetectChar attribute="Comment" context="comment" char="#"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context lineEndContext="#stay" name="object">
<RegExpr context="unquoted_key" String="[a-zA-Z\d_.+-]" lookAhead="true"/>
<DetectChar attribute="Key" context="double_key" char="""/>
<DetectChar attribute="Key" context="simple_key" char="'"/>
<DetectChar attribute="Colon" context="object_value" char=":"/>
<DetectChar attribute="Braces" context="#pop" char="}"/>
<DetectChar attribute="Comment" context="comment" char="#"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context attribute="Key" lineEndContext="#stay" name="double_key">
<IncludeRules context="quoted_double_string" includeAttrib="false"/>
<DetectChar attribute="Key" context="#pop" char="""/>
</context>
<context attribute="Key" lineEndContext="#stay" name="simple_key">
<IncludeRules context="quoted_simple_string" includeAttrib="false"/>
<DetectChar attribute="Key" context="#pop" char="'"/>
</context>
<context attribute="Key" lineEndContext="#stay" name="unquoted_key">
<RegExpr context="#pop" String="\s*:" lookAhead="true"/>
<RegExpr attribute="Error" String="[^a-zA-Z\d_.+-]" context="#pop"/>
</context>
<context attribute="String" lineEndContext="#pop" name="double_string">
<IncludeRules context="quoted_double_string" includeAttrib="false"/>
<DetectChar attribute="String" context="#pop" char="""/>
</context>
<context attribute="String" lineEndContext="#pop" name="simple_string">
<IncludeRules context="quoted_simple_string" includeAttrib="false"/>
<DetectChar attribute="String" context="#pop" char="'"/>
</context>
<context lineEndContext="#pop" name="quoted_double_string">
<RegExpr attribute="Escape" String="\\["\\]" context="#stay"/>
<RegExpr attribute="Error" String="\\[^"\\]" context="#stay"/>
</context>
<context lineEndContext="#pop" name="quoted_simple_string">
<RegExpr attribute="Escape" String="\\['\\]" context="#stay"/>
<RegExpr attribute="Error" String="\\[^'\\]" context="#stay"/>
</context>
<context attribute="String" lineEndContext="#pop" name="object_unquoted_string">
<DetectChar context="#pop" char="}" lookAhead="true"/>
<IncludeRules context="unquoted_string" includeAttrib="false"/>
</context>
<context attribute="String" lineEndContext="#pop" name="list_unquoted_string">
<DetectChar context="#pop" char="]" lookAhead="true"/>
<IncludeRules context="unquoted_string" includeAttrib="false"/>
</context>
<context attribute="String" lineEndContext="#pop" name="unquoted_string">
<RegExpr context="#pop" String="\s*," lookAhead="true"/>
<RegExpr context="comment" String="\s*#" lookAhead="true"/>
<RegExpr attribute="Error" String="[^a-zA-Z\d_.+-]" context="#pop"/>
</context>
<context lineEndContext="#pop" name="object_value">
<IncludeRules context="value" includeAttrib="true"/>
<RegExpr context="object_unquoted_string" String="[a-zA-Z\d_.+-]" lookAhead="true"/>
<DetectChar attribute="Comma" context="#pop" char=","/>
<DetectChar attribute="Braces" context="#pop#pop" char="}"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context lineEndContext="#stay" name="list">
<IncludeRules context="value" includeAttrib="true"/>
<RegExpr context="list_unquoted_string" String="[a-zA-Z\d_.+-]" lookAhead="true"/>
<DetectChar attribute="Comma" context="#stay" char=","/>
<DetectChar attribute="Brackets" context="#pop" char="]"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context lineEndContext="#stay" name="value">
<RegExpr attribute="Float" context="#stay" String="-?\d+(\.\d+)?[fF]"/>
<RegExpr attribute="Double" context="#stay" String="-?\d+(\.\d+[dD]?|[dD])"/>
<RegExpr attribute="Byte" context="#stay" String="-?\d+[bB]"/>
<RegExpr attribute="Short" context="#stay" String="-?\d+[sS]"/>
<RegExpr attribute="Long" context="#stay" String="-?\d+[lL]"/>
<RegExpr attribute="Integer" context="#stay" String="-?\d+"/>
<keyword attribute="Literal" context="#stay" String="literals"/>
<DetectChar attribute="String" context="double_string" char="""/>
<DetectChar attribute="String" context="simple_string" char="'"/>
<DetectChar attribute="Braces" context="object" char="{"/>
<RegExpr attribute="Brackets" context="byte_array" String="\[B;"/>
<RegExpr attribute="Brackets" context="int_array" String="\[I;"/>
<RegExpr attribute="Brackets" context="long_array" String="\[L;"/>
<DetectChar attribute="Brackets" context="list" char="["/>
<DetectChar attribute="Comment" context="comment" char="#"/>
</context>
<context lineEndContext="#stay" name="byte_array">
<RegExpr attribute="Byte" context="#stay" String="-?\d+[bB]"/>
<DetectChar attribute="Comma" context="#stay" char=","/>
<DetectChar attribute="Brackets" context="#pop" char="]"/>
<DetectChar attribute="Comment" context="comment" char="#"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context lineEndContext="#stay" name="int_array">
<RegExpr attribute="Integer" context="#stay" String="-?\d+"/>
<DetectChar attribute="Comma" context="#stay" char=","/>
<DetectChar attribute="Brackets" context="#pop" char="]"/>
<DetectChar attribute="Comment" context="comment" char="#"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context lineEndContext="#stay" name="long_array">
<RegExpr attribute="Long" context="#stay" String="-?\d+[lL]"/>
<DetectChar attribute="Comma" context="#stay" char=","/>
<DetectChar attribute="Brackets" context="#pop" char="]"/>
<DetectChar attribute="Comment" context="comment" char="#"/>
<RegExpr attribute="Error" context="#stay" String="[^ \n\r\t]"/>
</context>
<context attribute="Comment" lineEndContext="#pop" name="comment">
<keyword attribute="Comment Task" context="#stay" String="comment_tasks"/>
</context>
</contexts>
<itemDatas>
<itemData name="Braces" defStyleNum="dsOperator"/>
<itemData name="Brackets" defStyleNum="dsOperator"/>
<itemData name="Comma" defStyleNum="dsOperator"/>
<itemData name="Colon" defStyleNum="dsOperator"/>
<itemData name="Literal" defStyleNum="dsConstant"/>
<itemData name="Integer" defStyleNum="dsDecVal"/>
<itemData name="Byte" defStyleNum="dsDecVal"/>
<itemData name="Short" defStyleNum="dsDecVal"/>
<itemData name="Long" defStyleNum="dsDecVal"/>
<itemData name="Float" defStyleNum="dsFloat"/>
<itemData name="Double" defStyleNum="dsFloat"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="Key" defStyleNum="dsKeyword"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Escape" defStyleNum="dsSpecialChar"/>
<itemData name="Error" defStyleNum="dsError"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="#"/>
</comments>
<keywords casesensitive="1"/>
</general>
</language>