Warning, /frameworks/syntax-highlighting/data/syntax/modula-2-iso-only.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?> 0002 <!DOCTYPE language> 0003 <language name="Modula-2 (ISO only)" mimetype="text/x-modula2" version="4" 0004 kateversion="5.0" section="Sources" priority="3" extensions="*.mod;*.def" 0005 casesensitive="1" author="B. Kowarsch (trijezdci@github)" license="MIT"> 0006 <!-- 0007 ***************************************************************************** 0008 ISO Modula-2 syntax highlighting profile for Kate 0009 0010 Copyright (C) 2018 Modula-2 Software Foundation 0011 0012 Licensed under the MIT license <https://opensource.org/licenses/MIT> 0013 0014 This profile covers ISO Modula-2 (ISO 10514-1) by ISO/IEC/TC1/SC22/WG13. 0015 0016 Since standard specifications from ISO are not available publicly free 0017 of charge and the fees to obtain copies is quite high, references to a 0018 summary by Excelsior LLC are given in this profile. 0019 0020 A list of ISO Modula-2 keywords can be found at: 0021 0022 https://www.excelsior-usa.com/doc/xds/isom202.html#5 0023 0024 In ISO Modula-2 terminology there are two kinds of built-in identifiers: 0025 (1) predefined identifiers, also called pervasive identifiers or simply 0026 pervasives, and (2) identifiers that are provided by a built-in module, 0027 called SYSTEM. There is no terminology for the latter group. 0028 0029 A list of pervasives can be found at: 0030 0031 https://www.excelsior-usa.com/doc/xds/isom203.html#194 0032 0033 Identifiers provided by built-in module SYSTEM are given at: 0034 0035 https://www.excelsior-usa.com/doc/xds/isom204.html#306 0036 0037 Procedures ALLOCATE and DEALLOCATE to which macros NEW and DISPOSE resolve 0038 are given under the subsections for procedures NEW and DISPOSE. Although 0039 the implementations of ALLOCATE and DEALLOCATE are library supplied, their 0040 identifiers are hardcoded into the language. For the purpose of syntax 0041 highlighting, they should therefore be treated as built-in identifiers. 0042 Identifiers exported by built-in module SYSTEM are given in PIM4, page 121. 0043 0044 In ISO Modula-2 terminology, there are two kinds of procedures: those that 0045 return a result in their own name, and those that do not. When necessary to 0046 differentiate between them, the former are called function procedures and 0047 the latter proper procedures. For this reason, both function and procedure 0048 identifiers are listed together under "procedures" in this profile. 0049 0050 Some ISO Modula-2 compilers implemented additional built-in types, most 0051 notably LONGCARD, LONGINT, SHORTCARD and SHORTINT. However, these types are 0052 not part of the ISO Modula-2 language definition and consequently they are 0053 not recognised as built-in identifiers in this profile. 0054 ***************************************************************************** 0055 --> 0056 <highlighting> 0057 <list name="workaround"> 0058 <!-- BUG: Kate ignores first entry in context 'Normal' --> 0059 <!-- WORKAROUND: Use the name of this dummy list as first entry --> 0060 <item>???</item> <!-- use '???' in source to test/verify this bug --> 0061 </list> 0062 0063 <!-- KeyWords --> 0064 <list name="keywords"> 0065 <item>AND</item> 0066 <item>ARRAY</item> 0067 <item>BEGIN</item> 0068 <item>BY</item> 0069 <item>CASE</item> 0070 <item>CONST</item> 0071 <item>DEFINITION</item> 0072 <item>DIV</item> 0073 <item>DO</item> 0074 <item>ELSE</item> 0075 <item>ELSIF</item> 0076 <item>END</item> 0077 <item>EXIT</item> 0078 <item>EXCEPT</item> 0079 <item>EXPORT</item> 0080 <item>FINALLY</item> 0081 <item>FOR</item> 0082 <item>FORWARD</item> 0083 <item>FROM</item> 0084 <item>IF</item> 0085 <item>IMPLEMENTATION</item> 0086 <item>IMPORT</item> 0087 <item>IN</item> 0088 <item>LOOP</item> 0089 <item>MOD</item> 0090 <item>MODULE</item> 0091 <item>NOT</item> 0092 <item>OF</item> 0093 <item>OR</item> 0094 <item>PACKEDSET</item> 0095 <item>POINTER</item> 0096 <item>PROCEDURE</item> 0097 <item>QUALIFIED</item> 0098 <item>RECORD</item> 0099 <item>REM</item> 0100 <item>REPEAT</item> 0101 <item>RETRY</item> 0102 <item>RETURN</item> 0103 <item>SET</item> 0104 <item>THEN</item> 0105 <item>TO</item> 0106 <item>TYPE</item> 0107 <item>UNTIL</item> 0108 <item>VAR</item> 0109 <item>WHILE</item> 0110 <item>WITH</item> 0111 </list> 0112 0113 <!-- Built-in Constant Identifiers --> 0114 <list name="constants"> 0115 <item>FALSE</item> 0116 <item>INTERRUPTIBLE</item> 0117 <item>NIL</item> 0118 <item>TRUE</item> 0119 <item>UNINTERRUPTIBLE</item> 0120 </list> 0121 0122 <!-- Built-in Type Identifiers --> 0123 <list name="types"> 0124 <!-- Pervasives --> 0125 <item>BOOLEAN</item> 0126 <item>BITSET</item> 0127 <item>CARDINAL</item> 0128 <item>COMPLEX</item> 0129 <item>CHAR</item> 0130 <item>INTEGER</item> 0131 <item>LONGCOMPLEX</item> 0132 <item>LONGREAL</item> 0133 <item>PROC</item> 0134 <item>PROTECTION</item> 0135 <item>REAL</item> 0136 </list> 0137 0138 <!-- Built-in Procedure Identifiers --> 0139 <list name="procedures"> 0140 <!-- Pervasives --> 0141 <item>ABS</item> 0142 <item>CAP</item> 0143 <item>CHR</item> 0144 <item>CMPLX</item> 0145 <item>DEC</item> 0146 <item>EXCL</item> 0147 <item>FLOAT</item> 0148 <item>HALT</item> 0149 <item>HIGH</item> 0150 <item>IM</item> 0151 <item>INC</item> 0152 <item>INCL</item> 0153 <item>INT</item> 0154 <item>LENGTH</item> 0155 <item>LFLOAT</item> 0156 <item>MAX</item> 0157 <item>MIN</item> 0158 <item>ODD</item> 0159 <item>ORD</item> 0160 <item>RE</item> 0161 <item>SIZE</item> 0162 <item>TRUNC</item> 0163 <item>VAL</item> 0164 </list> 0165 0166 <!-- Built-in Macros --> 0167 <list name="macros"> 0168 <!-- NEW resolves to ALLOCATE --> 0169 <item>NEW</item> 0170 <item>ALLOCATE</item> 0171 0172 <!-- DISPOSE resolves to DEALLOCATE --> 0173 <item>DISPOSE</item> 0174 <item>DEALLOCATE</item> 0175 </list> 0176 0177 <!-- Module SYSTEM --> 0178 <list name="unsafe"> 0179 <!-- Module Identifier --> 0180 <item>SYSTEM</item> 0181 0182 <!-- Constants --> 0183 <item>BITSPERLOC</item> 0184 <item>BITSPERWORD</item> 0185 0186 <!-- Types --> 0187 <item>ADDRESS</item> 0188 <item>LOC</item> 0189 <item>WORD</item> 0190 0191 <!-- Procedures --> 0192 <item>ADDADR</item> 0193 <item>ADR</item> 0194 <item>CAST</item> 0195 <item>DIFADR</item> 0196 <item>MAKEADR</item> 0197 <item>ROTATE</item> 0198 <item>SHIFT</item> 0199 <item>SUBADR</item> 0200 <item>TSIZE</item> 0201 </list> 0202 0203 <contexts> 0204 <context attribute="Plain Source" lineEndContext="#stay" name="plain"> 0205 <!-- BUG: first entry is ignored, leave Dummy at first position --> 0206 <keyword attribute="Dummy" context="#stay" String="workaround"/> 0207 0208 <!-- Keyords --> 0209 <keyword attribute="Keyword" context="#stay" String="keywords"/> 0210 0211 <!-- Built-in Constant Identifiers --> 0212 <keyword attribute="Const" context="#stay" String="constants"/> 0213 0214 <!-- Built-in Type Identifiers --> 0215 <keyword attribute="Type" context="#stay" String="types"/> 0216 0217 <!-- Built-in Procedure Identifiers --> 0218 <keyword attribute="Builtin" context="#stay" String="procedures"/> 0219 0220 <!-- Built-in Macro Identifiers and Translations --> 0221 <keyword attribute="Builtin" context="#stay" String="macros"/> 0222 0223 <!-- Facilities from Built-in Module SYSTEM --> 0224 <keyword attribute="Unsafe" context="#stay" String="unsafe"/> 0225 0226 <!-- Base-16 Integer Literals --> 0227 <!-- Base-8 Integers and Character Code Literals --> 0228 <RegExpr attribute="Number" context="#stay" String="0[0-9A-F]*H|[0-7]+[BC]"/> 0229 0230 <!-- Real Number Literals --> 0231 <Float attribute="Number" context="#stay"/> 0232 0233 <!-- Decimal Integer Literals --> 0234 <Int attribute="Number" context="#stay"/> 0235 0236 <!-- Start of Double-Quoted String Literal --> 0237 <DetectChar attribute="String" context="DoubleQuotedString" char=""" /> 0238 0239 <!-- Start of Single-Quoted String Literal --> 0240 <DetectChar attribute="String" context="SingleQuotedString" char="'" /> 0241 0242 <!-- Start of Modula-2 Dialect Tags --> 0243 <StringDetect attribute="DialectTag" context="InDialectTag" String="(*!"/> 0244 0245 <!-- Start of Pragma --> 0246 <Detect2Chars attribute="Pragma" context="InPragma" char="<" char1="*"/> 0247 0248 <!-- Start of Comment --> 0249 <Detect2Chars attribute="Comment" 0250 context="InComment" char="(" char1="*" beginRegion="FoldableComment"/> 0251 </context> 0252 0253 <!-- End of Double-Quoted String Literal --> 0254 <context attribute="String" lineEndContext="#pop" name="DoubleQuotedString"> 0255 <DetectChar attribute="String" context="#pop" char="""/> 0256 </context> 0257 0258 <!-- End of Single-Quoted String Literal --> 0259 <context attribute="String" lineEndContext="#pop" name="SingleQuotedString"> 0260 <DetectChar attribute="String" context="#pop" char="'" /> 0261 </context> 0262 0263 <!-- End of Dialet Tag --> 0264 <context attribute="DialectTag" lineEndContext="#pop" name="InDialectTag"> 0265 <Detect2Chars attribute="DialectTag" context="#pop" char="*" char1=")"/> 0266 </context> 0267 0268 <!-- End of Pragma --> 0269 <context attribute="Pragma" lineEndContext="#stay" name="InPragma"> 0270 <Detect2Chars attribute="Pragma" context="#pop" char="*" char1=">"/> 0271 </context> 0272 0273 <context attribute="Comment" lineEndContext="#stay" name="InComment"> 0274 <!-- Start of nested Comment --> 0275 <Detect2Chars attribute="Comment" 0276 context="InComment" char="(" char1="*" beginRegion="FoldableComment"/> 0277 0278 <!-- End of Comment --> 0279 <Detect2Chars attribute="Comment" 0280 context="#pop" char="*" char1=")" endRegion="FoldableComment"/> 0281 0282 <DetectSpaces /> 0283 <IncludeRules context="##Comments" /> 0284 </context> 0285 </contexts> 0286 0287 <itemDatas> 0288 <!-- Style for Plain Source Text --> 0289 <itemData name="Plain Source" 0290 defStyleNum="dsNormal" bold="0" italic="0" /> 0291 0292 <!-- Style for Reserved Words --> 0293 <itemData name="Keyword" 0294 defStyleNum="dsKeyword" bold="1" italic="0" /> 0295 0296 <!-- Style for Built-in Constant Identifiers --> 0297 <itemData name="Const" 0298 defStyleNum="dsBuiltIn" bold="1" italic="0" /> 0299 0300 <!-- Style for Built-in Type Identifiers --> 0301 <itemData name="Type" 0302 defStyleNum="dsDataType" bold="1" italic="0" /> 0303 0304 <!-- Style for Built-in Procedure Identifiers --> 0305 <itemData name="Builtin" 0306 defStyleNum="dsBuiltIn" bold="1" italic="0" /> 0307 0308 <!-- Style for Facilities from Module SYSTEM --> 0309 <itemData name="Unsafe" 0310 defStyleNum="dsWarning" bold="1" italic="0"/> 0311 0312 <!-- Style for Number Literals --> 0313 <itemData name="Number" 0314 defStyleNum="dsDecVal" bold="0" italic="0" /> 0315 0316 <!-- Style for Quoted Literals --> 0317 <itemData name="String" 0318 defStyleNum="dsString" bold="0" italic="0" /> 0319 0320 <!-- Style for Dialect Tags --> 0321 <itemData name="DialectTag" 0322 defStyleNum="dsComment" bold="1" italic="0" /> 0323 0324 <!-- Style for Pragmas --> 0325 <itemData name="Pragma" 0326 defStyleNum="dsPreprocessor" bold="1" italic="0" /> 0327 0328 <!-- Style for Comments --> 0329 <itemData name="Comment" 0330 defStyleNum="dsComment" bold="0" italic="1" /> 0331 0332 <!-- Dummy style for testing --> 0333 <itemData name="Dummy" defStyleNum="dsError" /> 0334 </itemDatas> 0335 </highlighting> 0336 0337 <general> 0338 <keywords casesensitive="1" /> 0339 <comments> 0340 <comment name="multiLine" start="(*" end="*)" region="FoldableComment" /> 0341 </comments> 0342 </general> 0343 </language> 0344 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->