Debian Codegraph @

data/syntax/lpc.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3
4 <!--
5 =============================================================================
6 File: lpc.xml
7 URL: http://www.metamorpher.de/files/lpc.xml
8 Description: Syntax Highlighting for Lars Pensjo C (LPC)
9 It is used in Multi User Dungeons which use LDMud as Gamedriver.
10 For more information, see LDMud project: http://www.bearnip.com
11 For best highlighting results, configure colors yourself.
12 Author: Andreas Klauer ([email protected])
13 Changed: 2004-04-26
14 License: Artistic
15 =============================================================================
16 -->
17
18
19 <language name="LPC" version="4" kateversion="5.0" section="Sources" extensions="*.c;*.h;*.inc;*.o" author="Andreas Klauer ([email protected])" license="Artistic" >
20
21 <highlighting>
22
23 <!-- Keyword Lists: -->
24 <list name="modifiers">
25 <item>private</item>
26 <item>protected</item>
27 <item>static</item>
28 <item>public</item>
29 <item>nomask</item>
30 <item>varargs</item>
31 <item>nosave</item>
32 <item>virtual</item>
33 </list>
34 <list name="types">
35 <item>void</item>
36 <item>int</item>
37 <item>status</item>
38 <item>string</item>
39 <item>object</item>
40 <item>array</item>
41 <item>mapping</item>
42 <item>closure</item>
43 <item>symbol</item>
44 <item>float</item>
45 <item>mixed</item>
46 </list>
47 <list name="keywords">
48 <item>break</item>
49 <item>continue</item>
50 <item>return</item>
51 <item>if</item>
52 <item>else</item>
53 <item>for</item>
54 <item>foreach</item>
55 <item>do</item>
56 <item>while</item>
57 <item>switch</item>
58 <item>case</item>
59 <item>inherit</item>
60 <item>default</item>
61 <item>variables</item>
62 <item>functions</item>
63 <item>publish</item>
64 <item>nolog</item>
65 </list>
66
67 <!-- Parsing Rules: -->
68 <contexts>
69 <context name="Normal" attribute="Default" lineEndContext="#stay">
70 <RegExpr attribute="Region Marker" context="#stay" String="//\s*BEGIN.*$" beginRegion="regionMarker" firstNonSpace="true"/>
71 <RegExpr attribute="Region Marker" context="#stay" String="//\s*END.*$" endRegion="regionMarker" firstNonSpace="true"/>
72 <Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
73 <Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" beginRegion="blockComment" />
74 <keyword String="modifiers" attribute="Modifier" context="#stay" />
75 <keyword String="types" attribute="Datatype" context="#stay" />
76 <keyword String="keywords" attribute="Keywords" context="#stay" />
77 <DetectChar char="#" context="Preprocessor" attribute="Preprocessor" column="0"/>
78 <Float attribute="Floats" context="Float Suffixes"/>
79 <RegExpr String="0b[01]+" attribute="Binary" context="#stay" />
80 <RegExpr String="0x[0-9a-fA-F]+" attribute="Hexadecimal" context="#stay" />
81 <RegExpr String="0o[0-7]+" attribute="Octal" context="#stay" />
82 <Int attribute="Integer" context="#stay" />
83 <RegExpr String="#'[^\t ][^\t ,);}\]/]*" attribute="Closure" context="#stay" />
84 <DetectChar attribute="Strings" context="String1" char="&quot;" />
85 <HlCStringChar attribute="Char" context="#stay" />
86 <DetectChar attribute="Default" context="#stay" char="{" beginRegion="brace" />
87 <DetectChar attribute="Default" context="#stay" char="}" endRegion="brace" />
88 </context>
89 <context name="Float Suffixes" attribute="Floats" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
90 <AnyChar String="fFeE" attribute="Floats" context="#pop"/>
91 </context>
92 <context name="Comment1" attribute="Single-Line comments" lineEndContext="#pop">
93 <LineContinue attribute="Single-Line comments" context="#stay" />
94 <DetectSpaces />
95 <IncludeRules context="##Comments" />
96 </context>
97 <context name="Comment2" attribute="Multi-Line comments" lineEndContext="#stay">
98 <Detect2Chars attribute="Multi-Line comments" context="#pop" char="*" char1="/" endRegion="blockComment" />
99 <DetectSpaces />
100 <IncludeRules context="##Comments" />
101 </context>
102 <context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
103 <LineContinue attribute="Preprocessor" context="#stay" />
104 <Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
105 <Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" beginRegion="blockComment" />
106 <keyword String="modifiers" attribute="Modifier" context="#stay" />
107 <keyword String="types" attribute="Datatype" context="#stay" />
108 <keyword String="keywords" attribute="Keywords" context="#stay" />
109 <DetectChar attribute="Preprocessor-Strings" context="String2" char="&quot;" />
110 </context>
111 <context name="String1" attribute="Strings" lineEndContext="#pop">
112 <LineContinue attribute="Default" context="#stay" />
113 <Detect2Chars char="\" char1="\" attribute="Strings" context="#stay" />
114 <Detect2Chars char="\" char1="&quot;" attribute="Strings" context="#stay" />
115 <DetectChar char="&quot;" attribute="Strings" context="#pop" />
116 </context>
117 <context name="String2" attribute="Preprocessor-Strings" lineEndContext="#pop">
118 <LineContinue attribute="Default" context="#stay" />
119 <Detect2Chars char="\" char1="\" attribute="Preprocessor-Strings" context="#stay" />
120 <Detect2Chars char="\" char1="&quot;" attribute="Preprocessor-Strings" context="#stay" />
121 <DetectChar char="&quot;" attribute="Preprocessor-Strings" context="#pop" />
122 </context>
123 </contexts>
124
125 <!-- Color Settings: -->
126 <itemDatas>
127 <itemData name="Default" defStyleNum="dsNormal" />
128 <itemData name="Single-Line comments" defStyleNum="dsComment" />
129 <itemData name="Multi-Line comments" defStyleNum="dsComment" />
130 <itemData name="Modifier" defStyleNum="dsDataType" />
131 <itemData name="Datatype" defStyleNum="dsDataType" />
132 <itemData name="Keywords" defStyleNum="dsKeyword" />
133 <itemData name="Preprocessor" defStyleNum="dsOthers" />
134 <itemData name="Floats" defStyleNum="dsFloat" />
135 <itemData name="Binary" defStyleNum="dsBaseN" />
136 <itemData name="Hexadecimal" defStyleNum="dsBaseN" />
137 <itemData name="Octal" defStyleNum="dsBaseN" />
138 <itemData name="Integer" defStyleNum="dsDecVal" />
139 <itemData name="Closure" defStyleNum="dsOthers" />
140 <itemData name="Strings" defStyleNum="dsString" />
141 <itemData name="Preprocessor-Strings" defStyleNum="dsString" />
142 <itemData name="Char" defStyleNum="dsChar" />
143 <itemData name="Region Marker" defStyleNum="dsRegionMarker" />
144 </itemDatas>
145 </highlighting>
146
147 <!-- This is not for highlighting, but for detecting comments.
148 It allows Kate to hide comments if the user wished to do so. -->
149 <general>
150 <comments>
151 <comment name="singleLine" start="//" />
152 <comment name="multiLine" start="/*" end="*/" region="blockComment" />
153 </comments>
154 <keywords casesensitive="1" />
155 </general>
156
157 </language>
158 <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
159 <!-- === End of file. === -->