psyclpc/etc/lpc.xml

153 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
=============================================================================
File: lpc.xml
URL: http://www.metamorpher.de/files/lpc.xml
Description: Syntax Highlighting for Lars Pensjo C (LPC)
It is used in Multi User Dungeons which use LDMud as Gamedriver.
For more information, see LDMud project: http://www.bearnip.com
For best highlighting results, configure colors yourself.
Author: Andreas Klauer (Andreas.Klauer@metamorpher.de)
Changed: 2004-04-26
=============================================================================
-->
<language name="LPC" version="0.72" kateversion="2.2.1"
section="Sources" extensions="*.c;*.h;*.inc;*.o">
<highlighting>
<!-- Keyword Lists: -->
<list name="modifiers">
<item> private </item>
<item> protected </item>
<item> static </item>
<item> public </item>
<item> nomask </item>
<item> varargs </item>
<item> nosave </item>
<item> virtual </item>
</list>
<list name="types">
<item> void </item>
<item> int </item>
<item> status </item>
<item> string </item>
<item> object </item>
<item> array </item>
<item> mapping </item>
<item> closure </item>
<item> symbol </item>
<item> float </item>
<item> mixed </item>
</list>
<list name="keywords">
<item> break </item>
<item> continue </item>
<item> return </item>
<item> if </item>
<item> else </item>
<item> for </item>
<item> foreach </item>
<item> do </item>
<item> while </item>
<item> switch </item>
<item> case </item>
<item> inherit </item>
<item> default </item>
<item> variables </item>
<item> functions </item>
<item> publish </item>
<item> nolog </item>
</list>
<!-- Parsing Rules: -->
<contexts>
<context name="Normal" attribute="Default" lineEndContext="#stay">
<Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
<Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" />
<keyword String="modifiers" attribute="Modifiers" context="#stay" />
<keyword String="types" attribute="Datatype" context="#stay" />
<keyword String="keywords" attribute="Keywords" context="#stay" />
<RegExpr String="^#" context="Preprocessor" attribute="Preprocessor" />
<Float attribute="Floats" context="#stay">
<AnyChar String="fFeE" context="#stay" />
</Float>
<RegExpr String="0b[01]+" attribute="Binary" context="#stay" />
<RegExpr String="0x[0-9a-fA-F]+" attribute="Hexadecimal" context="#stay" />
<RegExpr String="0o[0-7]+" attribute="Octal" context="#stay" />
<Int attribute="Integer" context="#stay" />
<RegExpr String="#'[^\t ][^\t ,);}\]/]*" attribute="Closure" context="#stay" />
<DetectChar attribute="Strings" context="String1" char="&quot;" />
<HlCStringChar attribute="Char" context="#stay" />
</context>
<context name="Comment1" attribute="Single-Line comments" lineEndContext="#pop">
<LineContinue attribute="Single-Line comments" context="#stay" />
<RegExpr attribute="Comment-Keywords" context="#stay" String="^[A-Z]+:" />
</context>
<context name="Comment2" attribute="Multi-Line comments" lineEndContext="#stay">
<Detect2Chars attribute="Multi-Line comments" context="#pop" char="*" char1="/"/>
<RegExpr attribute="Comment-Keywords" context="#stay" String="^[A-Z]+:" />
</context>
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
<LineContinue attribute="Preprocessor" context="#stay" />
<Detect2Chars attribute="Single-Line comments" context="Comment1" char="/" char1="/" />
<Detect2Chars attribute="Multi-Line comments" context="Comment2" char="/" char1="*" />
<keyword String="modifiers" attribute="Modifier" context="#stay" />
<keyword String="types" attribute="Datatype" context="#stay" />
<keyword String="keywords" attribute="Keywords" context="#stay" />
<DetectChar attribute="Preprocessor-Strings" context="String2" char="&quot;" />
</context>
<context name="String1" attribute="Strings" lineEndContext="#pop">
<LineContinue attribute="Default" context="#stay" />
<Detect2Chars char="\" char1="\" attribute="Strings" context="#stay" />
<Detect2Chars char="\" char1="&quot;" attribute="Strings" context="#stay" />
<DetectChar char="&quot;" attribute="Strings" context="#pop" />
</context>
<context name="String2" attribute="Preprocessor-Strings" lineEndContext="#pop">
<LineContinue attribute="Default" context="#stay" />
<Detect2Chars char="\" char1="\" attribute="Preprocessor-Strings" context="#stay" />
<Detect2Chars char="\" char1="&quot;" attribute="Preprocessor-Strings" context="#stay" />
<DetectChar char="&quot;" attribute="Preprocessor-Strings" context="#pop" />
</context>
</contexts>
<!-- Color Settings: -->
<itemDatas>
<itemData name="Default" defStyleNum="dsNormal" />
<itemData name="Single-Line comments" defStyleNum="dsComment" />
<itemData name="Multi-Line comments" defStyleNum="dsComment" />
<itemData name="Comment-Keywords" defStyleNum="dsKeyword" />
<itemData name="Modifier" defStyleNum="dsDataType" />
<itemData name="Datatype" defStyleNum="dsDataType" />
<itemData name="Keywords" defStyleNum="dsKeyword" />
<itemData name="Preprocessor" defStyleNum="dsOthers" />
<itemData name="Floats" defStyleNum="dsFloat" />
<itemData name="Binary" defStyleNum="dsBaseN" />
<itemData name="Hexadecimal" defStyleNum="dsBaseN" />
<itemData name="Octal" defStyleNum="dsBaseN" />
<itemData name="Integer" defStyleNum="dsDecVal" />
<itemData name="Closure" defStyleNum="dsOthers" />
<itemData name="Strings" defStyleNum="dsString" />
<itemData name="Preprocessor-Strings" defStyleNum="dsString" />
<itemData name="Char" defStyleNum="dsChar" />
</itemDatas>
</highlighting>
<!-- This is not for highlighting, but for detecting comments.
It allows Kate to hide comments if the user wished to do so. -->
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<keywords casesensitive="1" />
</general>
</language>
<!-- === End of file. === -->