Debian Codegraph @

data/syntax/rtf.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language [ <!ENTITY number "([-]?\d+)"> ] >
3 <language name="Rich Text Format" version="3" kateversion="2.4" section="Markup" extensions="*.rtf" mimetype="text/rtf;application/rtf" author="Lukas Sommer" license="LGPL version 2.1, or version 3 or later versions approved by the membership of KDE e.V.; or any other license appoved by the emembership of KDE e.V.">
4
5 <highlighting>
6
7 <contexts>
8
9 <context attribute="Text" lineEndContext="#stay" name="context_normal">
10 <DetectChar char="{" attribute="Braces" beginRegion="true" />
11 <DetectChar char="}" attribute="Braces" endRegion="true" />
12 <DetectChar char="\" lookAhead="true" context="context_process_backslash" />
13 </context>
14
15 <context lineEndContext="context_normal" fallthrough="true" fallthroughContext="context_normal" attribute="Numeric parameter" name="context_process_backslash">
16 <Detect2Chars char="\" char1="|" attribute="Control words" />
17 <Detect2Chars char="\" char1="~" attribute="Character" />
18 <Detect2Chars char="\" char1="-" attribute="Character" />
19 <Detect2Chars char="\" char1="_" attribute="Character" />
20 <Detect2Chars char="\" char1=":" attribute="Control words" />
21 <Detect2Chars char="\" char1="*" attribute="Control words" />
22 <Detect2Chars char="\" char1="\" attribute="Character" />
23 <Detect2Chars char="\" char1="{" attribute="Character" />
24 <Detect2Chars char="\" char1="}" attribute="Character" />
25 <RegExpr String="\\u&number;|\\'[01-9a-f]{2}" attribute="Character"/>
26 <RegExpr String="\\[a-zA-Z]+" attribute="Control words" context="context_functionparameter" />
27 <DetectChar char="\" attribute="Error" />
28 </context>
29
30 <context attribute="Control words" lineEndContext="context_normal" fallthrough="true" fallthroughContext="context_normal" name="context_functionparameter">
31 <RegExpr String="[-]?\d+" attribute="Numeric parameter" context="context_normal" />
32 <DetectChar char="-" attribute="Error" />
33 </context>
34
35 </contexts>
36
37 <itemDatas>
38 <itemData name="Text" defStyleNum="dsString"/>
39 <itemData name="Character" defStyleNum="dsChar"/>
40 <itemData name="Braces" defStyleNum="dsKeyword"/>
41 <itemData name="Control words" defStyleNum="dsFunction"/>
42 <itemData name="Numeric parameter" defStyleNum="dsDecVal"/>
43 <itemData name="Error" defStyleNum="dsError"/>
44 </itemDatas>
45
46 </highlighting>
47
48 </language>