-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcasm.xml
176 lines (167 loc) · 8.11 KB
/
casm.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Copyright (C) 2016-2024 CASM Organization <https://casm-lang.org>
All rights reserved.
Developed by: Philipp Paulweber et al.
<https://github.com/casm-lang/casm-lang.plugin.kate/graphs/contributors>
This file is part of casm-lang.plugin.kate.
casm-lang.plugin.kate is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
casm-lang.plugin.kate 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with casm-lang.plugin.kate. If not, see <http://www.gnu.org/licenses/>.
Based on the GPL2 licensed go.xml syntax file from KDE's Kate project:
Copyright (c) 2010, Miquel Sabaté <mikisabate@gmail.com>
-->
<language name="CASM" section="Sources" extensions="*.casm" indenter="cstyle"
author="Emmanuel Pescosta (emmanuelpescosta099@gmail.com)" license="GPL"
version="1.0" kateversion="5.0">
<highlighting>
<list name="controlflow">
<item>diedie</item>
<item>impossible</item>
<item>skip</item>
<item>seq</item>
<item>endseq</item>
<item>par</item>
<item>endpar</item>
<item>if</item>
<item>then</item>
<item>else</item>
<item>forall</item>
<item>iterate</item>
<item>case</item>
<item>endcase</item>
<item>default</item>
</list>
<list name="keywords">
<item>and</item>
<item>or</item>
<item>xor</item>
<item>not</item>
<item>let</item>
<item>in</item>
<item>into</item>
<item>from</item>
<item>do</item>
<item>of</item>
<item>initially</item>
<item>function</item>
<item>derived</item>
<item>enum</item>
<item>rule</item>
<item>provider</item>
<item>init</item>
<item>option</item>
<item>CASM</item>
<item>symbol</item>
<item>static</item>
<item>defined</item>
<item>controlled</item>
</list>
<list name="builtin">
<item>assert</item>
<item>assure</item>
<item>print</item>
<item>debug</item>
<item>dumps</item>
<item>push</item>
<item>pop</item>
<item>call</item>
<item>intern_debug</item>
<item>div</item>
<item>objdump</item>
<item>program</item>
</list>
<list name="predeclared">
<item>self</item>
<item>undef</item>
<item>true</item>
<item>false</item>
</list>
<list name="types">
<item>RuleRef</item>
<item>Bit</item>
<item>Boolean</item>
<item>Integer</item>
<item>Floating</item>
<item>String</item>
<item>List</item>
<item>Tuple</item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces />
<keyword attribute="Control Flow" context="#stay" String="controlflow" />
<keyword attribute="Keyword" context="#stay" String="keywords" />
<keyword attribute="Builtin Function" context="#stay" String="builtin" />
<keyword attribute="Predeclared Identifier" context="#stay" String="predeclared" />
<keyword attribute="Data Type" context="#stay" String="types" />
<DetectIdentifier />
<Detect2Chars attribute="Symbol" context="#stay" char="{" char1="|" beginRegion="SeqBlock" />
<Detect2Chars attribute="Symbol" context="#stay" char="|" char1="}" endRegion="SeqBlock" />
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
<Float attribute="Float" context="#stay" />
<Int attribute="Decimal" context="#stay" />
<HlCOct attribute="Octal" context="#stay" />
<HlCHex attribute="Hex" context="#stay" />
<RegExpr attribute="Binary" context="#stay" String="0b[01]+" insensitive="false" />
<RegExpr attribute="Rational" context="#stay" String="[0-9]+r" insensitive="false" />
<HlCChar attribute="Char" context="#stay" />
<DetectChar attribute="String" context="String" char=""" />
<RegExpr attribute="RuleRef" context="#stay" String="@[a-zA-Z_][a-zA-Z0-9\_]*" />
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/" />
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment" />
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;" />
</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="Comment" lineEndContext="#pop" name="Commentar 1">
<LineContinue attribute="Comment" context="#stay" />
<IncludeRules context="##Alerts" />
</context>
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
<IncludeRules context="##Alerts" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false" />
<itemData name="Builtin Function" defStyleNum="dsBuiltIn" spellChecking="false" />
<itemData name="Predeclared Identifier" defStyleNum="dsConstant" spellChecking="false" />
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="String Char" defStyleNum="dsSpecialChar" />
<itemData name="RuleRef" defStyleNum="dsOthers" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Alert" defStyleNum="dsAlert" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<keywords casesensitive="1" additionalDeliminator="'"" />
</general>
</language>