Debian Codegraph @

data/syntax/j.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4 Changes:
5
6 Version 1.5 (2015-04-29) by Igor Zhuravlov
7 - language/@kateversion upgraded from "2.4" to "3.4"
8
9 Version 1.4 (2015-04-20) by Igor Zhuravlov
10 - merge versions 1.2 and 1.3
11 - removed not used def and defc entities
12 - approached color scheme to JQt
13 - separated out color scheme to j14.katehlcolor file
14 - dropped ExpArg: n. m. u. v. x. y.
15 - reformatted a bit
16
17 Version 1.3 (2014-05-26) by greg heil
18 - based on version 1.1
19 - add Foldable feature
20 - change color scheme
21 - add def and defc entities
22 - split long lines
23
24 Version 1.2 (2013-09-29) by Igor Zhuravlov
25 - fix Adverb regexp's pattern
26 - fix Verb regexp's pattern
27
28 Version 1.1 (2013-03-18) by Igor Zhuravlov
29 - fix enum entity's exponent definition
30 - rework String regexp's pattern
31 - use entities in Number regexp's pattern
32 - use entities in Control regexp's pattern
33
34 Version 1.0 (2012-03-21) by Igor Zhuravlov
35 - initial release
36
37 -->
38 <!DOCTYPE language
39 [
40 <!ENTITY unum "\d+"> <!-- Unsigned integer number -->
41 <!ENTITY anum "[a-z\d]+"> <!-- Non-10-based unsigned integer number, e.g. 1a -->
42 <!ENTITY bnum "\b&unum;b_?&anum;(\.&anum;)\b"> <!-- Based integer number, e.g. 36b_1a.z2 -->
43 <!ENTITY inum "_?&unum;"> <!-- Integer number -->
44 <!ENTITY xnum "\b&inum;x\b"> <!-- Extended precision integer number, e.g. _123x -->
45 <!ENTITY rnum "\b&inum;r&inum;\b"> <!-- Rational number, e.g. _1r23 -->
46 <!ENTITY fnum "&inum;(\.&unum;)?"> <!-- Floating point number, e.g. 1.23 -->
47 <!ENTITY enum "(&fnum;(e&inum;)?|_?_|_\.)"> <!-- Exponential (scientific) notation, e.g. 1.2e_3 -->
48 <!ENTITY cnum "&enum;((j|a[dr])&enum;)?"> <!-- Complex number, e.g. 1.2e3j4.5e_6 -->
49 <!ENTITY pnum "\b&cnum;([px]&cnum;)?(?![a-z\d_.])"> <!-- Number based on pi or e, e.g. 1j2p3j4 -->
50 <!ENTITY name "[a-zA-Z][a-zA-Z\d_]*"> <!-- Name -->
51 <!ENTITY lname "\b&name;_(&name;)?_\b"> <!-- Locative, a__ means a_base_ -->
52 <!ENTITY ilname "\b&name;__&name;\b"> <!-- Indirect locative -->
53 ]>
54 <!--
55 j.xml syntax highlighting for J programming language under Kate
56
57 J is a modern, high-level, general-purpose, high-performance, portable programming language
58 http://www.jsoftware.com
59
60 Kate is a KDE Advanced Text Editor
61 http://kate.kde.org/
62 -->
63 <language name="J"
64 section="Scripts"
65 version="5"
66 kateversion="5.0"
67 extensions="*.ijs;*.ijt;*.IJS;*.IJT"
68 mimetype="text/x-j;text/x-jsrc"
69 author="Igor Zhuravlov ([email protected]), greg heil ([email protected])"
70 indenter="normal"
71 license="GPL">
72 <highlighting>
73 <contexts>
74 <context attribute="Sentence" lineEndContext="#pop" name="sentence">
75 <DetectSpaces/>
76 <RegExpr attribute="Foldable" context="#stay" String=":\s*0|\bdefine\b" beginRegion="Fold"/>
77 <LineContinue attribute="Foldable" context="#stay" char=")" endRegion="Fold" column="0"/>
78 <StringDetect attribute="Comment" context="#stay" String="NB.(" beginRegion="Fold"/>
79 <StringDetect attribute="Comment" context="#stay" String="NB.)" endRegion="Fold"/>
80 <StringDetect attribute="Comment" context="comment line" String="NB."/>
81 <RegExpr attribute="String" context="#stay" String="&apos;([^&apos;]|&apos;&apos;)*&apos;"/>
82 <RegExpr attribute="Adverb" context="#stay" String="([/\\]\.|\b[bfMt]\.|\bt:|[~/\\}])(?![.:])"/>
83 <RegExpr attribute="Verb" context="#stay" String="(_?\d:|p\.\.|[ACeEIjLor]\.|[_/\\iqsux]:|\{::|[=!\]]|[-&lt;&gt;+*%$|,#\{][.:]?|[;\[]:?|[~}&quot;ip][.:]|[?^]\.?)(?![.:])"/>
84 <RegExpr attribute="Number" context="#stay" String="&bnum;|&xnum;|&rnum;|&pnum;"/>
85 <AnyChar attribute="Parens" context="#stay" String="()"/>
86 <RegExpr attribute="Conjunction" context="#stay" String="(&quot;|[@&amp;][.:]?|[.:][.:]?|[!D][.:]|&amp;\.:|[;dHT]\.|`:?|[LS^]:)(?![.:])"/>
87 <RegExpr attribute="Control" context="#stay" String="\b(assert|break|f?case|catch[dt]?|continue|do|else(if)?|end|for(_&name;)?|(goto|label)_&name;|if|return|select|throw|try|whil(e|st))\.(?![.:])"/>
88 <Detect2Chars attribute="Copulae Global" context="#stay" char="=" char1=":"/>
89 <Detect2Chars attribute="Copulae Local" context="#stay" char="=" char1="."/>
90 <RegExpr attribute="ExpArg" context="#stay" String="\b[nmuvxy](?![\w:.])"/>
91 <RegExpr attribute="Noun" context="#stay" String="\ba[.:](?![.:])"/>
92 </context>
93 <context attribute="Comment" lineEndContext="#pop" name="comment line">
94 <DetectSpaces />
95 <IncludeRules context="##Comments"/>
96 </context>
97 </contexts>
98 <itemDatas>
99 <itemData name="Sentence" defStyleNum="dsNormal"/>
100 <itemData name="Adverb" defStyleNum="dsKeyword" spellChecking="false"/>
101 <itemData name="Comment" defStyleNum="dsComment" spellChecking="true"/>
102 <itemData name="Conjunction" defStyleNum="dsKeyword" spellChecking="false"/>
103 <itemData name="Control" defStyleNum="dsKeyword" spellChecking="false"/>
104 <itemData name="Copulae Global" defStyleNum="dsKeyword" spellChecking="false"/>
105 <itemData name="Copulae Local" defStyleNum="dsKeyword" spellChecking="false"/>
106 <itemData name="ExpArg" defStyleNum="dsKeyword" spellChecking="false" italic="true"/>
107 <itemData name="Foldable" defStyleNum="dsRegionMarker" spellChecking="false"/>
108 <itemData name="Noun" defStyleNum="dsKeyword" spellChecking="false" bold="true"/>
109 <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/>
110 <itemData name="Parens" defStyleNum="dsRegionMarker" spellChecking="false"/>
111 <itemData name="String" defStyleNum="dsString" spellChecking="false"/>
112 <itemData name="Verb" defStyleNum="dsKeyword" spellChecking="false"/>
113 </itemDatas>
114 </highlighting>
115 <general>
116 <comments>
117 <comment name="multiLine" start="NB.(" end="NB.)" region="Fold"/>
118 <comment name="singleLine" start="NB."/>
119 </comments>
120 <folding indentationsensitive="true"/>
121 </general>
122 </language>
123 <!-- kate: replace-tabs on; indent-width 2; -->