1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE language SYSTEM "language.dtd">
5
=============================================================================
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 (Andreas.Klauer@metamorpher.de)
15
=============================================================================
19
<language name="LPC" version="0.76" kateversion="2.4" section="Sources" extensions="*.c;*.h;*.inc;*.o" author="Andreas Klauer (Andreas.Klauer@metamorpher.de)" license="Artistic" >
23
<!-- Keyword Lists: -->
24
<list name="modifiers">
25
<item> private </item>
26
<item> protected </item>
30
<item> varargs </item>
32
<item> virtual </item>
41
<item> mapping </item>
42
<item> closure </item>
47
<list name="keywords">
49
<item> continue </item>
54
<item> foreach </item>
59
<item> inherit </item>
60
<item> default </item>
61
<item> variables </item>
62
<item> functions </item>
63
<item> publish </item>
66
<list name="attention">
72
<item> WARNING </item>
76
<!-- Parsing Rules: -->
78
<context name="Normal" attribute="Default" lineEndContext="#stay">
79
<RegExpr attribute="Region Marker" context="#stay" String="//\s*BEGIN.*$" beginRegion="regionMarker" firstNonSpace="true"/>
80
<RegExpr attribute="Region Marker" context="#stay" String="//\s*END.*$" endRegion="regionMarker" firstNonSpace="true"/>
81
<Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
82
<Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" beginRegion="blockComment" />
83
<keyword String="modifiers" attribute="Modifier" context="#stay" />
84
<keyword String="types" attribute="Datatype" context="#stay" />
85
<keyword String="keywords" attribute="Keywords" context="#stay" />
86
<DetectChar char="#" context="Preprocessor" attribute="Preprocessor" column="0"/>
87
<Float attribute="Floats" context="#stay">
88
<AnyChar String="fFeE" context="#stay" />
90
<RegExpr String="0b[01]+" attribute="Binary" context="#stay" />
91
<RegExpr String="0x[0-9a-fA-F]+" attribute="Hexadecimal" context="#stay" />
92
<RegExpr String="0o[0-7]+" attribute="Octal" context="#stay" />
93
<Int attribute="Integer" context="#stay" />
94
<RegExpr String="#'[^\t ][^\t ,);}\]/]*" attribute="Closure" context="#stay" />
95
<DetectChar attribute="Strings" context="String1" char=""" />
96
<HlCStringChar attribute="Char" context="#stay" />
97
<DetectChar attribute="Default" context="#stay" char="{" beginRegion="brace" />
98
<DetectChar attribute="Default" context="#stay" char="}" endRegion="brace" />
100
<context name="Comment1" attribute="Single-Line comments" lineEndContext="#pop">
101
<LineContinue attribute="Single-Line comments" context="#stay" />
102
<keyword attribute="Alert" context="#stay" String="attention" />
104
<context name="Comment2" attribute="Multi-Line comments" lineEndContext="#stay">
105
<Detect2Chars attribute="Multi-Line comments" context="#pop" char="*" char1="/" endRegion="blockComment" />
106
<keyword attribute="Alert" context="#stay" String="attention" />
108
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
109
<LineContinue attribute="Preprocessor" context="#stay" />
110
<Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
111
<Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" beginRegion="blockComment" />
112
<keyword String="modifiers" attribute="Modifier" context="#stay" />
113
<keyword String="types" attribute="Datatype" context="#stay" />
114
<keyword String="keywords" attribute="Keywords" context="#stay" />
115
<DetectChar attribute="Preprocessor-Strings" context="String2" char=""" />
117
<context name="String1" attribute="Strings" lineEndContext="#pop">
118
<LineContinue attribute="Default" context="#stay" />
119
<Detect2Chars char="\" char1="\" attribute="Strings" context="#stay" />
120
<Detect2Chars char="\" char1=""" attribute="Strings" context="#stay" />
121
<DetectChar char=""" attribute="Strings" context="#pop" />
123
<context name="String2" attribute="Preprocessor-Strings" lineEndContext="#pop">
124
<LineContinue attribute="Default" context="#stay" />
125
<Detect2Chars char="\" char1="\" attribute="Preprocessor-Strings" context="#stay" />
126
<Detect2Chars char="\" char1=""" attribute="Preprocessor-Strings" context="#stay" />
127
<DetectChar char=""" attribute="Preprocessor-Strings" context="#pop" />
131
<!-- Color Settings: -->
133
<itemData name="Default" defStyleNum="dsNormal" />
134
<itemData name="Single-Line comments" defStyleNum="dsComment" />
135
<itemData name="Multi-Line comments" defStyleNum="dsComment" />
136
<itemData name="Alert" defStyleNum="dsAlert" />
137
<itemData name="Modifier" defStyleNum="dsDataType" />
138
<itemData name="Datatype" defStyleNum="dsDataType" />
139
<itemData name="Keywords" defStyleNum="dsKeyword" />
140
<itemData name="Preprocessor" defStyleNum="dsOthers" />
141
<itemData name="Floats" defStyleNum="dsFloat" />
142
<itemData name="Binary" defStyleNum="dsBaseN" />
143
<itemData name="Hexadecimal" defStyleNum="dsBaseN" />
144
<itemData name="Octal" defStyleNum="dsBaseN" />
145
<itemData name="Integer" defStyleNum="dsDecVal" />
146
<itemData name="Closure" defStyleNum="dsOthers" />
147
<itemData name="Strings" defStyleNum="dsString" />
148
<itemData name="Preprocessor-Strings" defStyleNum="dsString" />
149
<itemData name="Char" defStyleNum="dsChar" />
150
<itemData name="Region Marker" defStyleNum="dsRegionMarker" />
154
<!-- This is not for highlighting, but for detecting comments.
155
It allows Kate to hide comments if the user wished to do so. -->
158
<comment name="singleLine" start="//" />
159
<comment name="multiLine" start="/*" end="*/" />
161
<keywords casesensitive="1" />
165
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
166
<!-- === End of file. === -->