Debian Codegraph @

data/syntax/metamath.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language [
3 <!ENTITY label "[0-9A-Za-z.\-_]+">
4 <!ENTITY symbol "[^ $]+">
5 ]>
6 <!-- low priority to let Objective-C++ win for .mm files per default -->
7 <language name="Metamath" section="Scientific" extensions="*.mm" priority="-9"
8 version="5" kateversion="5.0" author="Aaron Puchert" license="MIT">
9 <highlighting>
10 <contexts>
11 <!-- Block: ${ statement* $} -->
12 <context name="Block" attribute="Normal" lineEndContext="#stay">
13 <DetectSpaces/>
14 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
15 <Detect2Chars char="$" char1="[" attribute="Keyword" context="Include"/>
16 <Detect2Chars char="$" char1="{" attribute="Keyword" context="Block" beginRegion="block"/>
17 <Detect2Chars char="$" char1="}" attribute="Keyword" context="#pop" endRegion="block"/>
18 <Detect2Chars char="$" char1="v" attribute="Keyword" context="VariableDeclaration"/>
19 <Detect2Chars char="$" char1="c" attribute="Keyword" context="ConstantDeclaration"/>
20 <Detect2Chars char="$" char1="d" attribute="Keyword" context="DisjointRestriction"/>
21 <RegExpr String="&label;" attribute="Label" context="LabelledStatement"/>
22 </context>
23 <!-- Comment: $( text $) -->
24 <context name="Comment" attribute="Comment" lineEndContext="#stay">
25 <RegExpr String=" ~ *&label;" attribute="ReferenceLabel" context="#stay"/>
26 <Detect2Chars char="$" char1=")" attribute="Comment" context="#pop" endRegion="comment"/>
27 <IncludeRules context="##Comments"/>
28 </context>
29 <!-- Include: $[ filename $] -->
30 <context name="Include" attribute="Include" lineEndContext="#stay">
31 <Detect2Chars char="$" char1="]" attribute="Keyword" context="#pop"/>
32 </context>
33 <!-- Variable symbol declaration: $v symbol* $. -->
34 <context name="VariableDeclaration" attribute="Variable" lineEndContext="#stay">
35 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
36 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop"/>
37 </context>
38 <!-- Constant symbol declaration: $c symbol* $. -->
39 <context name="ConstantDeclaration" attribute="Constant" lineEndContext="#stay">
40 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
41 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop"/>
42 </context>
43 <!-- Disjoint variable restriction: $d [variable]* $. -->
44 <context name="DisjointRestriction" attribute="Variable" lineEndContext="#stay">
45 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
46 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop"/>
47 </context>
48 <!-- Labeled statements: label $* ... $. -->
49 <context name="LabelledStatement" attribute="Normal" lineEndContext="#stay">
50 <DetectSpaces/>
51 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
52 <Detect2Chars char="$" char1="f" attribute="Keyword" context="#pop!VariableTypeHypothesis"/>
53 <Detect2Chars char="$" char1="e" attribute="Keyword" context="#pop!LogicalHypothesis"/>
54 <Detect2Chars char="$" char1="a" attribute="Keyword" context="#pop!AxiomaticAssertion"/>
55 <Detect2Chars char="$" char1="p" attribute="Keyword" context="#pop!ProvableAssertion"/>
56 </context>
57 <!-- Variable-type hypothesis: label $f constant variable $. -->
58 <context name="VariableTypeHypothesis" attribute="Normal" lineEndContext="#stay">
59 <DetectSpaces/>
60 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
61 <RegExpr String="&symbol;" attribute="Constant" context="#pop!SymbolList"/>
62 </context>
63 <!-- Logical hypothesis: label $e constant symbol* $. -->
64 <context name="LogicalHypothesis" attribute="Normal" lineEndContext="#stay">
65 <DetectSpaces/>
66 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
67 <RegExpr String="&symbol;" attribute="Constant" context="#pop!SymbolList"/>
68 </context>
69 <!-- Axiomatic assertion: label $a constant symbol* $. -->
70 <context name="AxiomaticAssertion" attribute="Normal" lineEndContext="#stay">
71 <DetectSpaces/>
72 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
73 <RegExpr String="&symbol;" attribute="Constant" context="#pop!SymbolList"/>
74 </context>
75 <!-- Provable assertion: label $p constant symbol* $= label* $. -->
76 <context name="ProvableAssertion" attribute="Normal" lineEndContext="#stay">
77 <DetectSpaces/>
78 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
79 <RegExpr String="&symbol;" attribute="Constant" context="#pop!ProvableAssertionSymbolList"/>
80 </context>
81 <!-- List of symbols, ending either with $. or $= -->
82 <context name="SymbolList" attribute="Variable" lineEndContext="#stay">
83 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
84 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop"/>
85 </context>
86 <context name="ProvableAssertionSymbolList" attribute="Variable" lineEndContext="#stay">
87 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
88 <Detect2Chars char="$" char1="=" attribute="Keyword" context="#pop!Proof" beginRegion="proof"/>
89 </context>
90 <!-- Proof: label* -->
91 <context name="Proof" attribute="Label" lineEndContext="#stay">
92 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
93 <DetectChar char="(" attribute="Keyword" context="#pop!CompressedProofStatements"/>
94 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop" endRegion="proof"/>
95 </context>
96 <!-- Compressed proof syntax: instead of label* we have (label*) [A-Z]* -->
97 <context name="CompressedProofStatements" attribute="Label" lineEndContext="#stay">
98 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
99 <DetectChar char=")" attribute="Keyword" context="#pop!CompressedProofSteps"/>
100 </context>
101 <context name="CompressedProofSteps" attribute="CompressedProof" lineEndContext="#stay">
102 <Detect2Chars char="$" char1="(" attribute="Comment" context="Comment" beginRegion="comment"/>
103 <Detect2Chars char="$" char1="." attribute="Keyword" context="#pop" endRegion="proof"/>
104 </context>
105 </contexts>
106 <itemDatas>
107 <itemData name="Normal" defStyleNum="dsNormal" spellChecking="false"/>
108 <itemData name="Comment" defStyleNum="dsComment"/>
109 <itemData name="Include" defStyleNum="dsImport" spellChecking="false"/>
110 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
111 <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>
112 <itemData name="Constant" defStyleNum="dsFunction" spellChecking="false"/>
113 <itemData name="Label" defStyleNum="dsSpecialString" spellChecking="false"/>
114 <itemData name="ReferenceLabel" defStyleNum="dsCommentVar" spellChecking="false"/>
115 <itemData name="CompressedProof" defStyleNum="dsString" spellChecking="false"/>
116 </itemDatas>
117 </highlighting>
118 <general>
119 <keywords casesensitive="1"/>
120 <comments>
121 <comment name="multiLine" start="$(" end="$)" region="comment"/>
122 </comments>
123 </general>
124 </language>
125 <!-- kate: replace-tabs off; -->