-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpure.xml
154 lines (143 loc) · 6.25 KB
/
pure.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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Pure syntax highlighting for kate. Usage:
- Copy this file either to ~/.kde/share/apps/katepart/syntax or to the global
/opt/kde3/share/apps/katepart/syntax directory (or wherever the Kate syntax
files are located on your system).
- You may also want to add a mime type for *.pure files so that your file
manager can recognize them.
- Fire up kate on your Pure script and enjoy the syntax highlighting.
Folding of comments and block structure is also supported.
Author: Albert Graef, with some fixes contributed by Eddie Rucker
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<language name="Pure" version="1.2" kateversion="2.4" section="Sources" extensions="*.pure">
<highlighting>
<list name="blockstarters">
<item> case </item>
<item> when </item>
<item> with </item>
</list>
<list name="blockenders">
<item> end </item>
</list>
<list name="keywords">
<item> const </item>
<item> def </item>
<item> else </item>
<item> extern </item>
<item> if </item>
<item> infix </item>
<item> infixl </item>
<item> infixr </item>
<item> interface </item>
<item> let </item>
<item> namespace </item>
<item> nonfix </item>
<item> of </item>
<item> otherwise </item>
<item> outfix </item>
<item> postfix </item>
<item> prefix </item>
<item> private </item>
<item> public </item>
<item> then </item>
<item> type </item>
<item> using </item>
</list>
<list name="special">
<item> catch </item>
<item> throw </item>
<item> __break__ </item>
<item> __trace__ </item>
</list>
<list name="types">
<item> bigint </item>
<item> bool </item>
<item> char </item>
<item> float </item>
<item> double </item>
<item> expr </item>
<item> short </item>
<item> int </item>
<item> long </item>
<item> string </item>
<item> pointer </item>
<item> void </item>
<item> int8 </item>
<item> int16 </item>
<item> int32 </item>
<item> int64 </item>
<item> matrix </item>
<item> dmatrix </item>
<item> cmatrix </item>
<item> imatrix </item>
<item> smatrix </item>
<item> nmatrix </item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces />
<keyword attribute="Keyword" context="#stay" String="blockstarters" beginRegion="Block" />
<keyword attribute="Keyword" context="#stay" String="blockenders" endRegion="Block" />
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<keyword attribute="Function" context="#stay" String="special"/>
<keyword attribute="Type" context="#stay" String="types"/>
<RegExpr attribute="Operator" context="#stay" String="([A-Z][a-zA-Z0-0_']*\.)*[\-!#\$%&\*\+/<=>\?\@\^\|~\.:]+" />
<RegExpr attribute="Signature" context="#stay" String="\s*[a-z_][a-zA-Z0-9_']*\s*(?=::([^\-!#\$%&\*\+/<=>\?\@\^\|~\.:]|$))" />
<RegExpr attribute="Signature" context="#stay" String="\s*(\([\-!#\$%&\*\+/<=>\?\@\^\|~\.:]*\))*\s*(?=::[^\-!#\$%&\*\+/<=>\?\@\^\|~\.:])" />
<!-- <RegExpr attribute="Normal Text" context="#stay" String="[A-Za-z_][A-Za-z0-9_]*"/> -->
<RegExpr attribute="Number" context="#stay" String="0x[A-Za-z0-9]+"/>
i <RegExpr attribute="Type" context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />
<Float attribute="Number" context="#stay"/>
<Int attribute="Number" context="#stay"/>
<HlCChar attribute="Char" context="#stay"/>
<DetectChar attribute="String" context="String" char="""/>
<Detect2Chars attribute="Comment" context="Comment1" char="/" char1="*" beginRegion="Comment" />
<Detect2Chars attribute="Comment" context="Comment2" char="/" char1="/"/>
</context>
<context attribute="String" lineEndContext="#pop" name="String">
<LineContinue attribute="String" context="#stay"/>
<HlCStringChar attribute="String Char" context="#stay"/>
<DetectChar attribute="String" context="#pop" char="""/>
</context>
<context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
</context>
<context attribute="Comment" lineEndContext="#stay" name="Comment1">
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
</context>
<context attribute="Comment" lineEndContext="#pop" name="Comment2"/>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Function" defStyleNum="dsFunction"/>
<itemData name="Type" defStyleNum="dsDataType"/>
<itemData name="Number" defStyleNum="dsDecVal" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Signature" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Operator" defStyleNum="dsFunction" spellChecking="false" />
<itemData name="String Char" defStyleNum="dsChar"/>
<itemData name="Comment" defStyleNum="dsComment" />
</itemDatas>
</highlighting>
<general>
<keywords casesensitive="1" />
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
</general>
</language>