Debian Codegraph @

data/syntax/git-ignore.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language [
3 <!ENTITY charclasses "(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit)">
4 ]>
5 <language name="Git Ignore" version="4" kateversion="5.62" section="Configuration" extensions=".gitignore*;" mimetype="text/x-git-ignore" license="LGPL">
6 <highlighting>
7 <contexts>
8
9 <context name="ini" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Exclude">
10 <DetectChar char="#" attribute="Comment" context="Comment"/>
11 <DetectChar char="!" attribute="Include - Prefix" context="Include"/>
12 </context>
13
14 <context name="Comment" attribute="Comment" lineEndContext="#pop">
15 </context>
16
17
18 <context name="Include" attribute="Include" lineEndContext="#pop">
19 <AnyChar attribute="Include - Glob" String="?*"/>
20 <DetectChar char="/" attribute="Include - Directory Separator"/>
21 <DetectChar char="[" attribute="Include - Glob Range" context="IncludeGlobRange"/>
22 <DetectChar char="\" attribute="Include - Escape" context="IncludeEscaped"/>
23 <RegExpr attribute="Include" String="[^[?*\\/]+"/>
24 </context>
25 <context name="IncludeEscaped" attribute="Include" lineEndContext="#pop#pop">
26 <RegExpr attribute="Include" String="." context="#pop"/>
27 </context>
28
29 <context name="IncludeGlobRange" attribute="Include - Glob Range" lineEndContext="#pop#pop" fallthroughContext="IncludeGlobRangeListStart">
30 <AnyChar String="^!" attribute="Include - Glob Range" context="IncludeGlobRangeListStart"/>
31 </context>
32 <context name="IncludeGlobRangeListStart" attribute="Include - Glob Range" lineEndContext="#pop#pop" fallthroughContext="#pop!IncludeGlobRangeList">
33 <DetectChar char="]" attribute="Include - Glob Inner Range" context="#pop!IncludeGlobRangeList"/>
34 </context>
35
36 <context name="IncludeGlobRangeList" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop" fallthroughContext="IncludeGlobRangeListSpecial">
37 <RegExpr attribute="Include - Glob Inner Range" String="([^[\\\]]+|\[(?!(:&charclasses;:|\.[a-z-]\.|=[a-z]=)\]))++" context="IncludeGlobRangeListSpecial"/>
38 </context>
39
40 <context name="IncludeGlobRangeListSpecial" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop#pop">
41 <DetectChar char="]" attribute="Include - Glob Range" context="#pop#pop#pop"/>
42 <DetectChar char="\" attribute="Include - Escape" context="IncludeGlobRangeEscape"/>
43 <DetectChar char="[" attribute="Include - Character Class" context="IncludeGlobRangeCharClass"/>
44 </context>
45 <context name="IncludeGlobRangeCharClass" attribute="Include - Character Class" lineEndContext="#pop#pop#pop#pop">
46 <DetectChar char="]" attribute="Include - Character Class" context="#pop#pop"/>
47 <AnyChar String=":.=-" attribute="Include - Character Class"/>
48 <DetectIdentifier attribute="Include - Character Class"/>
49 </context>
50 <context name="IncludeGlobRangeEscape" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop#pop#pop">
51 <RegExpr attribute="Include - Glob Inner Range" String="." context="#pop#pop"/>
52 </context>
53
54
55 <!-- Exclude rules (same of Include, but with Exclude prefix for attribute) -->
56
57 <context name="Exclude" attribute="Exclude" lineEndContext="#pop">
58 <AnyChar attribute="Exclude - Glob" String="?*"/>
59 <DetectChar char="/" attribute="Exclude - Directory Separator"/>
60 <DetectChar char="[" attribute="Exclude - Glob Range" context="ExcludeGlobRange"/>
61 <DetectChar char="\" attribute="Exclude - Escape" context="ExcludeEscaped"/>
62 <RegExpr attribute="Exclude" String="[^[?*\\/]+"/>
63 </context>
64 <context name="ExcludeEscaped" attribute="Exclude" lineEndContext="#pop#pop">
65 <RegExpr attribute="Exclude" String="." context="#pop"/>
66 </context>
67
68 <context name="ExcludeGlobRange" attribute="Exclude - Glob Range" lineEndContext="#pop#pop" fallthroughContext="ExcludeGlobRangeListStart">
69 <AnyChar String="^!" attribute="Exclude - Glob Range" context="ExcludeGlobRangeListStart"/>
70 </context>
71 <context name="ExcludeGlobRangeListStart" attribute="Exclude - Glob Range" lineEndContext="#pop#pop" fallthroughContext="#pop!ExcludeGlobRangeList">
72 <DetectChar char="]" attribute="Exclude - Glob Inner Range" context="#pop!ExcludeGlobRangeList"/>
73 </context>
74
75 <context name="ExcludeGlobRangeList" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop" fallthroughContext="ExcludeGlobRangeListSpecial">
76 <RegExpr attribute="Exclude - Glob Inner Range" String="([^[\\\]]+|\[(?!(:&charclasses;:|\.[a-z-]\.|=[a-z]=)\]))++" context="ExcludeGlobRangeListSpecial"/>
77 </context>
78
79 <context name="ExcludeGlobRangeListSpecial" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop#pop">
80 <DetectChar char="]" attribute="Exclude - Glob Range" context="#pop#pop#pop"/>
81 <DetectChar char="\" attribute="Exclude - Escape" context="ExcludeGlobRangeEscape"/>
82 <DetectChar char="[" attribute="Exclude - Character Class" context="ExcludeGlobRangeCharClass"/>
83 </context>
84 <context name="ExcludeGlobRangeCharClass" attribute="Exclude - Character Class" lineEndContext="#pop#pop#pop#pop">
85 <DetectChar char="]" attribute="Exclude - Character Class" context="#pop#pop"/>
86 <AnyChar String=":.=-" attribute="Exclude - Character Class"/>
87 <DetectIdentifier attribute="Exclude - Character Class"/>
88 </context>
89 <context name="ExcludeGlobRangeEscape" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop#pop#pop">
90 <RegExpr attribute="Exclude - Glob Inner Range" String="." context="#pop#pop"/>
91 </context>
92
93 </contexts>
94
95 <itemDatas>
96 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
97 <itemData name="Comment" defStyleNum="dsComment"/>
98
99 <itemData name="Exclude" defStyleNum="dsString" spellChecking="false"/>
100 <itemData name="Exclude - Directory Separator" defStyleNum="dsNormal" spellChecking="false"/>
101 <itemData name="Exclude - Escape" defStyleNum="dsString" spellChecking="false"/>
102 <itemData name="Exclude - Glob" defStyleNum="dsOperator" spellChecking="false"/>
103 <itemData name="Exclude - Glob Range" defStyleNum="dsNormal" spellChecking="false"/>
104 <itemData name="Exclude - Glob Inner Range" defStyleNum="dsString" spellChecking="false"/>
105 <itemData name="Exclude - Character Class" defStyleNum="dsString" spellChecking="false"/>
106
107 <itemData name="Include" defStyleNum="dsChar" spellChecking="false"/>
108 <itemData name="Include - Prefix" defStyleNum="dsChar" spellChecking="false"/>
109 <itemData name="Include - Directory Separator" defStyleNum="dsNormal" spellChecking="false"/>
110 <itemData name="Include - Escape" defStyleNum="dsChar" spellChecking="false"/>
111 <itemData name="Include - Glob" defStyleNum="dsOperator" spellChecking="false"/>
112 <itemData name="Include - Glob Range" defStyleNum="dsNormal" spellChecking="false"/>
113 <itemData name="Include - Glob Inner Range" defStyleNum="dsChar" spellChecking="false"/>
114 <itemData name="Include - Character Class" defStyleNum="dsChar" spellChecking="false"/>
115 </itemDatas>
116
117 </highlighting>
118
119 <general>
120 <comments>
121 <comment name="singleLine" start="#"/>
122 </comments>
123 <keywords casesensitive="0"/>
124 </general>
125 </language>
126