Warning, /frameworks/syntax-highlighting/data/syntax/modula-2.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" mimetype="text/x-modula2" version="8"
0004   kateversion="5.0" section="Sources" priority="5" extensions="*.mod;*.def"
0005   casesensitive="1"  author="B. Kowarsch (trijezdci@github)"  license="MIT">
0006 <!--
0007   *****************************************************************************
0008   Multi-Dialect 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 file should be placed in /usr/share.org.kde.syntax-highlighting/syntax/.
0015 
0016   1. Dialect Support
0017 
0018   This profile covers the following Modula-2 dialects:
0019 
0020   (1) PIM Modula-2 (Wirth, 1985)
0021   (2) ISO Modula-2 (ISO 10514-1)
0022   (3) Modula-2 R10 (Kowarsch & Sutcliffe, 2010)
0023 
0024   The default context  recognises reserved words and built-in identifiers that
0025   are common to all dialects and tags them accordingly for highlighting.
0026 
0027   1.2 Dialect Disambiguation
0028 
0029   In order to disambiguate dialects, the profile also recognises entities that
0030   are indicative of a specific dialect, tags them accordingly for highlighting
0031   and switches the context to the dialect of which the entity is indicative.
0032 
0033   However, this approach does NOT prevent  mis-identification  as it is always
0034   possible  that a  user or library defined identifier  matches an entity that
0035   is a reserved word or built-in identifier in another dialect.
0036 
0037   It is therefore  advisable  to place  dialect tags  into the top of Modula-2
0038   source files.
0039 
0040   1.3 Dialect Tags
0041 
0042   A dialect tag is a specially formatted comment that specifies the dialect in
0043   use.  The profile recognises the following dialect tags:
0044 
0045   (*!m2pim*) specifies the PIM dialect
0046   (*!m2iso*) specifies the ISO dialect
0047   (*!m2r10*) specifies the R10 dialect
0048 
0049   Dialect tags  may  also include a  compiler extension suffix  following  the
0050   dialect identifier  and preceded by '+'  to indicate  the  use  of  compiler
0051   specific language extensions.  Such suffixes are recognised but ignored.
0052 
0053   Using a dialect tag  guarantees  that the profile identifies the source file
0054   correctly.  Attention: No whitespace is permitted within a dialect tag.
0055 
0056   These dialect tags are also  recognised  by  Emacs, Vim/vi  and the Pygments
0057   source code rendering framework.  Support in other editors and frameworks is
0058   being added over time.
0059 
0060   2. Classification
0061 
0062   2.1 Reserved Words
0063 
0064   In Modula-2 terminology, keywords are called reserved words.  Reserved words
0065   are tagged "Keyword" regardless of their kind or purpose.
0066 
0067   2.2 Built-in Identifiers
0068 
0069   Modula-2 distinguishes two kinds of built-in identifiers: so called standard
0070   identifiers, also called  pervasive identifiers  or simply  pervasives;  and
0071   identifiers  provided by a  built-in module  for  unsafe facilities,  called
0072   SYSTEM in PIM and ISO Modula-2, and UNSAFE in Modula-2 R10.
0073 
0074   Pervasive Identifiers are tagged according to their kind as follows:
0075 
0076   (1) Constants are tagged "Const"
0077   (2) Types are tagged "Type"
0078   (3) Functions, procedures and macros are tagged "Builtin"
0079   (4) Identifiers provided by SYSTEM/UNSAFE are tagged "Unsafe"
0080 
0081   The tagging of the  latter group  regardless of kind or purpose  follows the
0082   Modula-2 philosophy of  making the  use of  unsafe facilities  explicit  and
0083   easily identifiable within the source code in order to sensitise programmers
0084   and thereby discourage and minimise their use.
0085 
0086   2.3 Numeric Literals
0087 
0088   There  are  three kinds of  numeric  literals: whole number  literals,  real
0089   number literals  and  character code literals.  Numeric literals  are tagged
0090   "Number" regardless of their kind.
0091 
0092   2.4 Quoted Literals
0093 
0094   There are  two ways to quote  a character or string: using single quotes, or
0095   using double quotes.  Quoted literals  are  tagged  "String"  regardless  of
0096   their type or kind.
0097 
0098   2.5 Comments and Pragmas
0099 
0100   Dialect tags, although comments, are tagged "DialectTag",  any other comments
0101   are tagged "Comment",  and pragmas are tagged "Pragma".
0102 
0103   2.6 Any Other Entities
0104 
0105   Any other entities are tagged "Plain Source".
0106 
0107   3. Rendering Styles
0108 
0109   By default, the above tags/attributes are assigned styles as follows:
0110 
0111   Keyword => dsKeyword, bold
0112   Const => dsBuiltin, bold
0113   Type => dsDataType, bold
0114   Builtin => dsBuiltin, bold
0115   Unsafe => dsWarning, bold
0116   Number => dsDecVal
0117   String => dsString
0118   DialectTag => dsComment, bold
0119   Comment => dsComment, italic
0120   Pragma => dsPreprocessor, bold
0121   Plain Source => dsNormal
0122 
0123   These styles can be customised in Kate via Settings->Configure Kate...
0124   *****************************************************************************
0125 -->
0126   <highlighting>
0127     <list name="workaround">
0128       <!-- BUG: Kate ignores first entry in first context -->
0129       <!-- WORKAROUND: Use the name of this dummy list as first entry -->
0130       <item>???</item> <!-- use '???' in source to test/verify this bug -->
0131     </list>
0132 
0133 <!--
0134   ============================================================================
0135   Common Entities - Lowest Common Denominator
0136   ============================================================================
0137 -->
0138     <!-- Common Reserved Words -->
0139     <list name="common-keywords">
0140       <item>AND</item>
0141       <item>ARRAY</item>
0142       <item>BEGIN</item>
0143       <item>BY</item>
0144       <item>CASE</item>
0145       <item>CONST</item>
0146       <item>DEFINITION</item>
0147       <item>DIV</item>
0148       <item>DO</item>
0149       <item>ELSE</item>
0150       <item>ELSIF</item>
0151       <item>END</item>
0152       <item>EXIT</item>
0153       <item>FOR</item>
0154       <item>FROM</item>
0155       <item>IF</item>
0156       <item>IMPLEMENTATION</item>
0157       <item>IMPORT</item>
0158       <item>IN</item>
0159       <item>LOOP</item>
0160       <item>MOD</item>
0161       <item>MODULE</item>
0162       <item>NOT</item>
0163       <item>OF</item>
0164       <item>OR</item>
0165       <item>POINTER</item>
0166       <item>PROCEDURE</item>
0167       <item>RECORD</item>
0168       <item>REPEAT</item>
0169       <item>RETURN</item>
0170       <item>SET</item>
0171       <item>THEN</item>
0172       <item>TO</item>
0173       <item>TYPE</item>
0174       <item>UNTIL</item>
0175       <item>VAR</item>
0176       <item>WHILE</item>
0177     </list>
0178 
0179     <!-- Common Pervasive Constants -->
0180     <list name="common-constants">
0181       <item>FALSE</item>
0182       <item>NIL</item>
0183       <item>TRUE</item>
0184     </list>
0185 
0186     <!-- Common Pervasive Types -->
0187     <list name="common-types">
0188       <item>BOOLEAN</item>
0189       <item>CARDINAL</item>
0190       <item>CHAR</item>
0191       <item>INTEGER</item>
0192       <item>LONGREAL</item>
0193       <item>REAL</item>
0194     </list>
0195 
0196     <!-- Common Pervasive Procedures -->
0197     <list name="common-procedures">
0198       <item>ABS</item>
0199       <item>CHR</item>
0200       <item>MAX</item>
0201       <item>MIN</item>
0202       <item>ODD</item>
0203       <item>ORD</item>
0204     </list>
0205 
0206     <!-- Common Unsafe Facilities -->
0207     <list name="common-unsafe">
0208       <!-- Types -->
0209       <item>ADDRESS</item>
0210       <item>WORD</item>
0211       <!-- Procedures -->
0212       <item>ADR</item>
0213     </list>
0214 
0215 <!--
0216   ============================================================================
0217   Dialect Indicative Entities
0218   ============================================================================
0219 -->
0220 <!--
0221   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0222   PIM Indicators - Entities indicative of PIM Modula-2
0223   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0224 -->
0225     <!-- There are no reswords, pervasives or builtins indicative of PIM -->
0226 
0227     <!-- PIM-only Libraries -->
0228     <list name="pim-only-libraries">
0229       <item>InOut</item>
0230       <item>MathLib0</item>
0231     </list>
0232 
0233 <!--
0234   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0235   ISO Indicators - Entities indicative of ISO Modula-2
0236   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0237 -->
0238     <!-- ISO-only Reserved Words -->
0239     <list name="iso-only-keywords">
0240       <!--NB: FORWARD is not indicative of ISO,
0241           PIM single-pass compilers also use it.-->
0242       <item>EXCEPT</item>
0243       <item>FINALLY</item>
0244       <item>PACKEDSET</item>
0245       <item>REM</item>
0246       <item>RETRY</item>
0247     </list>
0248 
0249     <!-- ISO-only Pervasive Constants -->
0250     <list name="iso-only-constants">
0251       <item>INTERRUPTIBLE</item>
0252       <item>UNINTERRUPTIBLE</item>
0253     </list>
0254 
0255     <!-- ISO-only Pervasive Types -->
0256     <list name="iso-only-types">
0257       <!--NB: COMPLEX and LONGCOMPLEX are not indicative of ISO,
0258           they are also part of the R10 standard library.-->
0259       <item>PROTECTION</item>
0260     </list>
0261 
0262     <!-- ISO-only Pervasive Procedures -->
0263     <list name="iso-only-procedures">
0264       <item>CMPLX</item>
0265       <item>IM</item>
0266       <item>LFLOAT</item>
0267       <item>RE</item>
0268     </list>
0269 
0270     <!-- ISO-only Unsafe Facilities -->
0271     <list name="iso-only-unsafe">
0272       <!-- Constants -->
0273       <item>BITSPERLOC</item>
0274       <item>BITSPERWORD</item>
0275       <!-- Types -->
0276       <item>LOC</item>
0277       <!-- Procedures -->
0278       <item>ADDADR</item>
0279       <item>DIFADR</item>
0280       <item>MAKEADR</item>
0281       <item>ROTATE</item>
0282       <item>SHIFT</item>
0283       <item>SUBADR</item>
0284     </list>
0285 
0286     <!-- ISO-only Libraries -->
0287     <list name="iso-only-libraries">
0288       <item>IOConsts</item>
0289       <item>IOLink</item>
0290       <item>IOResult</item>
0291       <item>LongIO</item>
0292       <item>WholeIO</item>
0293       <item>RawIO</item>
0294       <item>SIOResult</item>
0295       <item>SLongIO</item>
0296       <item>SWholeIO</item>
0297       <item>SRealIO</item>
0298       <item>SRawIO</item>
0299       <item>ConvTypes</item>
0300       <item>RealStr</item>
0301       <item>WholeStr</item>
0302       <item>WholeConv</item>
0303     </list>
0304 
0305 <!--
0306   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0307   R10 Indicators - Entities indicative of Modula-2 R10
0308   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0309 -->
0310     <!-- R10-only Reserved Words -->
0311     <list name="r10-only-keywords">
0312       <item>ALIAS</item>
0313       <item>ARGLIST</item>
0314       <item>BLUEPRINT</item>
0315       <item>COPY</item>
0316       <item>GENLIB</item>
0317       <item>OPAQUE</item>
0318       <item>READ</item>
0319       <item>REFERENTIAL</item>
0320       <item>RELEASE</item>
0321       <item>RETAIN</item>
0322       <item>WRITE</item>
0323       <item>YIELD</item>
0324     </list>
0325 
0326     <!-- R10-only Pervasive Types -->
0327     <list name="r10-only-types">
0328       <!--NB: LONGCARD is not indicative of R10,
0329           some PIM and ISO compilers also use it.-->
0330       <item>OCTET</item>
0331       <item>UNICHAR</item>
0332     </list>
0333 
0334     <!-- R10-only Pervasive Procedures -->
0335     <list name="r10-only-procedures">
0336       <item>APPEND</item>
0337       <item>CAPACITY</item>
0338       <item>COUNT</item>
0339       <item>INSERT</item>
0340       <item>LOG2</item>
0341       <item>POW2</item>
0342       <item>PRED</item>
0343       <item>PTR</item>
0344       <item>REMOVE</item>
0345       <item>SGN</item>
0346       <item>SUCC</item>
0347     </list>
0348 
0349     <!-- R10-only Pervasive Macros -->
0350     <list name="r10-only-macros">
0351       <item>TLIMIT</item>
0352       <item>TMAX</item>
0353       <item>TMIN</item>
0354     </list>
0355 
0356     <!-- R10-only Unsafe Facilities -->
0357     <list name="r10-only-unsafe">
0358       <!-- Module -->
0359       <item>UNSAFE</item>
0360       <!-- Types -->
0361       <item>LONGWORD</item>
0362       <item>OCTETSEQ</item>
0363       <!-- Procedures -->
0364       <item>BIT</item>
0365       <item>BWAND</item>
0366       <item>BWNOT</item>
0367       <item>BWOR</item>
0368       <item>SETBIT</item>
0369       <item>SHL</item>
0370       <item>SHR</item>
0371     </list>
0372 
0373     <!-- R10-only Libraries -->
0374     <list name="r10-only-libraries">
0375       <item>PervasiveIO</item>
0376       <item>UnsafeIO</item>
0377     </list>
0378 
0379 <!--
0380   ============================================================================
0381   Entities for PIM Context
0382   ============================================================================
0383 -->
0384     <!-- All PIM Reserved Words -->
0385     <list name="pim-keywords">
0386       <item>AND</item>
0387       <item>ARRAY</item>
0388       <item>BEGIN</item>
0389       <item>BY</item>
0390       <item>CASE</item>
0391       <item>CONST</item>
0392       <item>DEFINITION</item>
0393       <item>DIV</item>
0394       <item>DO</item>
0395       <item>ELSE</item>
0396       <item>ELSIF</item>
0397       <item>END</item>
0398       <item>EXIT</item>
0399       <item>EXPORT</item>
0400       <item>FOR</item>
0401       <item>FROM</item>
0402       <item>IF</item>
0403       <item>IMPLEMENTATION</item>
0404       <item>IMPORT</item>
0405       <item>IN</item>
0406       <item>LOOP</item>
0407       <item>MOD</item>
0408       <item>MODULE</item>
0409       <item>NOT</item>
0410       <item>OF</item>
0411       <item>OR</item>
0412       <item>POINTER</item>
0413       <item>PROCEDURE</item>
0414       <item>QUALIFIED</item>
0415       <item>RECORD</item>
0416       <item>REPEAT</item>
0417       <item>RETURN</item>
0418       <item>SET</item>
0419       <item>THEN</item>
0420       <item>TO</item>
0421       <item>TYPE</item>
0422       <item>UNTIL</item>
0423       <item>VAR</item>
0424       <item>WHILE</item>
0425       <item>WITH</item>
0426     </list>
0427 
0428     <!-- All PIM Pervasive Constants -->
0429     <list name="pim-constants">
0430       <item>FALSE</item>
0431       <item>NIL</item>
0432       <item>TRUE</item>
0433     </list>
0434 
0435     <!-- All PIM Pervasive Types -->
0436     <list name="pim-types">
0437       <item>BOOLEAN</item>
0438       <item>BITSET</item>
0439       <item>CARDINAL</item>
0440       <item>CHAR</item>
0441       <item>INTEGER</item>
0442       <item>LONGINT</item>
0443       <item>LONGREAL</item>
0444       <item>PROC</item>
0445       <item>REAL</item>
0446     </list>
0447 
0448     <!-- All PIM Pervasive Procedures -->
0449     <list name="pim-procedures">
0450       <item>ABS</item>
0451       <item>CAP</item>
0452       <item>CHR</item>
0453       <item>DEC</item>
0454       <item>EXCL</item>
0455       <item>FLOAT</item>
0456       <item>HALT</item>
0457       <item>HIGH</item>
0458       <item>INC</item>
0459       <item>INCL</item>
0460       <item>MAX</item>
0461       <item>MIN</item>
0462       <item>ODD</item>
0463       <item>ORD</item>
0464       <item>SIZE</item>
0465       <item>TRUNC</item>
0466       <item>VAL</item>
0467     </list>
0468 
0469     <!-- All PIM Pervasive Macros and their translations -->
0470     <list name="pim-macros">
0471       <item>NEW</item>
0472       <!--resolves to-->
0473       <item>ALLOCATE</item>
0474       <item>DISPOSE</item>
0475       <!--resolves to-->
0476       <item>DEALLOCATE</item>
0477     </list>
0478 
0479     <!-- All PIM Unsafe Facilities -->
0480     <list name="pim-unsafe">
0481       <!-- Module -->
0482       <item>SYSTEM</item>
0483       <!-- Types -->
0484       <item>ADDRESS</item>
0485       <item>PROCESS</item>
0486       <item>WORD</item>
0487       <!-- Procedures -->
0488       <item>ADR</item>
0489       <item>NEWPROCESS</item>
0490       <item>TRANSFER</item>
0491       <item>TSIZE</item>
0492     </list>
0493 
0494 <!--
0495   ============================================================================
0496   Entities for ISO Context
0497   ============================================================================
0498 -->
0499     <!-- All ISO Reserved Words -->
0500     <list name="iso-keywords">
0501       <item>AND</item>
0502       <item>ARRAY</item>
0503       <item>BEGIN</item>
0504       <item>BY</item>
0505       <item>CASE</item>
0506       <item>CONST</item>
0507       <item>DEFINITION</item>
0508       <item>DIV</item>
0509       <item>DO</item>
0510       <item>ELSE</item>
0511       <item>ELSIF</item>
0512       <item>END</item>
0513       <item>EXIT</item>
0514       <item>EXCEPT</item>
0515       <item>EXPORT</item>
0516       <item>FINALLY</item>
0517       <item>FOR</item>
0518       <item>FORWARD</item>
0519       <item>FROM</item>
0520       <item>IF</item>
0521       <item>IMPLEMENTATION</item>
0522       <item>IMPORT</item>
0523       <item>IN</item>
0524       <item>LOOP</item>
0525       <item>MOD</item>
0526       <item>MODULE</item>
0527       <item>NOT</item>
0528       <item>OF</item>
0529       <item>OR</item>
0530       <item>PACKEDSET</item>
0531       <item>POINTER</item>
0532       <item>PROCEDURE</item>
0533       <item>QUALIFIED</item>
0534       <item>RECORD</item>
0535       <item>REM</item>
0536       <item>REPEAT</item>
0537       <item>RETRY</item>
0538       <item>RETURN</item>
0539       <item>SET</item>
0540       <item>THEN</item>
0541       <item>TO</item>
0542       <item>TYPE</item>
0543       <item>UNTIL</item>
0544       <item>VAR</item>
0545       <item>WHILE</item>
0546       <item>WITH</item>
0547     </list>
0548 
0549     <!-- All ISO Pervasive Constants -->
0550     <list name="iso-constants">
0551       <item>FALSE</item>
0552       <item>INTERRUPTIBLE</item>
0553       <item>NIL</item>
0554       <item>TRUE</item>
0555       <item>UNINTERRUPTIBLE</item>
0556     </list>
0557 
0558     <!-- All ISO Pervasive Types -->
0559     <list name="iso-types">
0560       <item>BOOLEAN</item>
0561       <item>BITSET</item>
0562       <item>CARDINAL</item>
0563       <item>COMPLEX</item>
0564       <item>CHAR</item>
0565       <item>INTEGER</item>
0566       <item>LONGCOMPLEX</item>
0567       <item>LONGREAL</item>
0568       <item>PROC</item>
0569       <item>PROTECTION</item>
0570       <item>REAL</item>
0571     </list>
0572 
0573     <!-- All ISO Pervasive Procedures -->
0574     <list name="iso-procedures">
0575       <item>ABS</item>
0576       <item>CAP</item>
0577       <item>CHR</item>
0578       <item>CMPLX</item>
0579       <item>DEC</item>
0580       <item>EXCL</item>
0581       <item>FLOAT</item>
0582       <item>HALT</item>
0583       <item>HIGH</item>
0584       <item>IM</item>
0585       <item>INC</item>
0586       <item>INCL</item>
0587       <item>INT</item>
0588       <item>LENGTH</item>
0589       <item>LFLOAT</item>
0590       <item>MAX</item>
0591       <item>MIN</item>
0592       <item>ODD</item>
0593       <item>ORD</item>
0594       <item>RE</item>
0595       <item>SIZE</item>
0596       <item>TRUNC</item>
0597       <item>VAL</item>
0598     </list>
0599 
0600     <!-- All ISO Pervasive Macros and teir translations -->
0601     <list name="iso-macros">
0602       <item>NEW</item>
0603       <!--resolves to-->
0604       <item>ALLOCATE</item>
0605       <item>DISPOSE</item>
0606       <!--resolves to-->
0607       <item>DEALLOCATE</item>
0608     </list>
0609 
0610     <!-- All ISO Unsafe Facilities -->
0611     <list name="iso-unsafe">
0612       <!-- Module -->
0613       <item>SYSTEM</item>
0614       <!-- Constants -->
0615       <item>BITSPERLOC</item>
0616       <item>BITSPERWORD</item>
0617       <!-- Types -->
0618       <item>ADDRESS</item>
0619       <item>LOC</item>
0620       <item>WORD</item>
0621       <!-- Procedures -->
0622       <item>ADDADR</item>
0623       <item>ADR</item>
0624       <item>CAST</item>
0625       <item>DIFADR</item>
0626       <item>MAKEADR</item>
0627       <item>ROTATE</item>
0628       <item>SHIFT</item>
0629       <item>SUBADR</item>
0630       <item>TSIZE</item>
0631     </list>
0632 
0633 <!--
0634   ============================================================================
0635   Entities for R10 Context
0636   ============================================================================
0637 -->
0638     <!-- All R10 Reserved Words -->
0639     <list name="r10-keywords">
0640       <item>ALIAS</item>
0641       <item>AND</item>
0642       <item>ARGLIST</item>
0643       <item>ARRAY</item>
0644       <item>BEGIN</item>
0645       <item>BLUEPRINT</item>
0646       <item>BY</item>
0647       <item>CASE</item>
0648       <item>CONST</item>
0649       <item>COPY</item>
0650       <item>DEFINITION</item>
0651       <item>DIV</item>
0652       <item>DO</item>
0653       <item>ELSE</item>
0654       <item>ELSIF</item>
0655       <item>END</item>
0656       <item>EXIT</item>
0657       <item>FOR</item>
0658       <item>FROM</item>
0659       <item>GENLIB</item>
0660       <item>IF</item>
0661       <item>IMPLEMENTATION</item>
0662       <item>IMPORT</item>
0663       <item>IN</item>
0664       <item>LOOP</item>
0665       <item>MOD</item>
0666       <item>MODULE</item>
0667       <item>NEW</item>
0668       <item>NOT</item>
0669       <item>OF</item>
0670       <item>OPAQUE</item>
0671       <item>OR</item>
0672       <item>POINTER</item>
0673       <item>PROCEDURE</item>
0674       <item>READ</item>
0675       <item>RECORD</item>
0676       <item>REFERENTIAL</item>
0677       <item>RELEASE</item>
0678       <item>REPEAT</item>
0679       <item>RETAIN</item>
0680       <item>RETURN</item>
0681       <item>SET</item>
0682       <item>THEN</item>
0683       <item>TO</item>
0684       <item>TYPE</item>
0685       <item>UNTIL</item>
0686       <item>VAR</item>
0687       <item>WHILE</item>
0688       <item>WRITE</item>
0689       <item>YIELD</item>
0690     </list>
0691 
0692     <!-- All R10 Pervasive Constants -->
0693     <list name="r10-constants">
0694       <item>FALSE</item>
0695       <item>NIL</item>
0696       <item>TRUE</item>
0697     </list>
0698 
0699     <!-- All R10 Pervasive Types -->
0700     <list name="r10-types">
0701       <item>BOOLEAN</item>
0702       <item>CARDINAL</item>
0703       <item>CHAR</item>
0704       <item>INTEGER</item>
0705       <item>LONGCARD</item>
0706       <item>LONGINT</item>
0707       <item>LONGREAL</item>
0708       <item>OCTET</item>
0709       <item>REAL</item>
0710       <item>UNICHAR</item>
0711     </list>
0712 
0713     <!-- All R10 Pervasive Procedures -->
0714     <list name="r10-procedures">
0715       <item>ABS</item>
0716       <item>APPEND</item>
0717       <item>CAPACITY</item>
0718       <item>CHR</item>
0719       <item>COUNT</item>
0720       <item>ENTIER</item>
0721       <item>INSERT</item>
0722       <item>LENGTH</item>
0723       <item>LOG2</item>
0724       <item>MAX</item>
0725       <item>MIN</item>
0726       <item>ODD</item>
0727       <item>ORD</item>
0728       <item>POW2</item>
0729       <item>PRED</item>
0730       <item>PTR</item>
0731       <item>REMOVE</item>
0732       <item>SGN</item>
0733       <item>SUCC</item>
0734     </list>
0735 
0736     <!-- All R10 Pervasive Macros -->
0737     <list name="r10-macros">
0738       <item>TLIMIT</item>
0739       <item>TMAX</item>
0740       <item>TMIN</item>
0741       <item>TSIZE</item>
0742     </list>
0743 
0744     <!-- All R10 Unsafe Facilities -->
0745     <list name="r10-unsafe">
0746       <!-- Reserved Words -->
0747       <item>CAST</item>
0748       <!-- Module -->
0749       <item>UNSAFE</item>
0750       <!-- Constants -->
0751       <item>BitsPerAddress</item>
0752       <item>BitsPerByte</item>
0753       <item>BytesPerWord</item>
0754       <item>BytesPerLongWord</item>
0755       <!-- Types -->
0756       <item>ADDRESS</item>
0757       <item>BYTE</item>
0758       <item>LONGWORD</item>
0759       <item>OCTETSEQ</item>
0760       <item>WORD</item>
0761       <!-- Procedures -->
0762       <item>ADD</item>
0763       <item>ADR</item>
0764       <item>BIT</item>
0765       <item>BWAND</item>
0766       <item>BWNOT</item>
0767       <item>BWOR</item>
0768       <item>HALT</item>
0769       <item>SETBIT</item>
0770       <item>SHL</item>
0771       <item>SHR</item>
0772       <item>SUB</item>
0773       <!-- Macros -->
0774       <item>NOP</item>
0775     </list>
0776 
0777     <contexts>
0778 <!--
0779   ============================================================================
0780   Common Context
0781   ============================================================================
0782   This context is selected by default, prior to any dialect disambiguation.
0783   ============================================================================
0784 -->
0785       <context name="Common" attribute="Plain Source" lineEndContext="#stay">
0786         <!-- BUG: first entry is ignored, leave Dummy at first position -->
0787         <keyword attribute="Dummy" context="#stay" String="workaround"/>
0788 <!--
0789   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0790   Dialect tags
0791   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0792   Occurence selects specified dialect. Compiler extension suffix is ignored.
0793 
0794   EBNF:
0795 
0796   dialectTag :=
0797     '(*!' dialectIdent ( '+' compilerExtension )? '*)'
0798     ;
0799 
0800   dialectIdent :=
0801     'm2pim' | 'm2iso' | 'm2r10'
0802     ;
0803 
0804   compilerExtension :=
0805     LowerCaseLetter ( LowerCaseLetter | Digit )*
0806     ;
0807 
0808   LowerCaseLetter := 'a' .. 'z';
0809 
0810   Digit := '0' .. '9' ;
0811   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0812 -->
0813         <!-- PIM Dialect Tag (*!m2pim*) -->
0814         <RegExpr attribute="DialectTag" context="PIM"
0815           String="\(\*\!m2pim(\+[a-z][a-z0-9]*)?\*\)"/>
0816 
0817         <!-- ISO Dialect Tag (*!m2iso*) -->
0818         <RegExpr attribute="DialectTag" context="ISO"
0819           String="\(\*\!m2iso(\+[a-z][a-z0-9]*)?\*\)"/>
0820 
0821         <!-- R10 Dialect Tag (*!m2r10*) -->
0822         <RegExpr attribute="DialectTag" context="R10"
0823           String="\(\*\!m2r10(\+[a-z][a-z0-9]*)?\*\)"/>
0824 <!--
0825   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0826   Entities common to all dialects, occurrence does not select any dialect
0827   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0828 -->
0829         <!-- Common Reserved Words -->
0830         <keyword attribute="Keyword"
0831           context="#stay" String="common-keywords"/>
0832 
0833         <!-- Common Pervasive Constants -->
0834         <keyword attribute="Const"
0835           context="#stay" String="common-constants"/>
0836 
0837         <!-- Common Pervasive Types -->
0838         <keyword attribute="Const"
0839           context="#stay" String="common-types"/>
0840 
0841         <!-- Common Pervasive Procedures -->
0842         <keyword attribute="Builtin"
0843           context="#stay" String="common-procedures"/>
0844 
0845         <!-- Common Unsafe Facilities -->
0846         <keyword attribute="Unsafe"
0847           context="#stay" String="common-unsafe"/>
0848 <!--
0849   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0850   Entities indicative of a dialect, occurrence selects indicated dialect
0851   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0852 -->
0853         <!-- Dialect Indicative Reserved Words -->
0854         <keyword attribute="Keyword"
0855           context="ISO" String="iso-only-keywords"/>
0856         <keyword attribute="Keyword"
0857           context="R10" String="r10-only-keywords"/>
0858 
0859         <!-- Dialect Indicative Constants -->
0860         <keyword attribute="Const"
0861           context="ISO" String="iso-only-constants"/>
0862 
0863          <!-- Dialect Indicative Types -->
0864         <keyword attribute="Type"
0865           context="ISO" String="iso-only-types"/>
0866         <keyword attribute="Type"
0867           context="R10" String="r10-only-types"/>
0868 
0869         <!-- Dialect Indicative Procedures -->
0870         <keyword attribute="Builtin"
0871           context="ISO" String="iso-only-procedures"/>
0872         <keyword attribute="Builtin"
0873           context="R10" String="r10-only-procedures"/>
0874 
0875         <!-- Dialect Indicative Macros -->
0876         <keyword attribute="Builtin"
0877           context="R10" String="r10-only-macros"/>
0878 
0879         <!-- Dialect Indicative Unsafe Facilities -->
0880         <keyword attribute="Unsafe" context="ISO" String="iso-only-unsafe"/>
0881         <keyword attribute="Unsafe" context="R10" String="r10-only-unsafe"/>
0882 
0883         <!-- Dialect Indicative Libraries -->
0884         <keyword attribute="Plain Source"
0885           context="PIM" String="pim-only-libraries"/>
0886         <keyword attribute="Plain Source"
0887           context="ISO" String="iso-only-libraries"/>
0888         <keyword attribute="Plain Source"
0889           context="R10" String="r10-only-libraries"/>
0890 <!--
0891   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0892   Literals common to all dialects, occurrence does not select any dialect
0893   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0894 -->
0895         <!-- Real Number Literals -->
0896         <Float attribute="Number" context="#stay"/>
0897 
0898         <!-- Decimal Whole Number Literals -->
0899         <Int attribute="Number" context="#stay"/>
0900 
0901         <!-- Double-Quoted Character and String Literals -->
0902         <DetectChar attribute="String" context="DoubleQuoted" char="&quot;"/>
0903 
0904         <!-- Single-Quoted Character and String Literals -->
0905         <DetectChar attribute="String" context="SingleQuoted" char="'"/>
0906 
0907         <!-- Opening Block Comment Delimiter -->
0908         <Detect2Chars attribute="Comment" context="BlockComment"
0909           char="(" char1="*" beginRegion="FoldableComment"/>
0910       </context><!--Common-->
0911 
0912 <!--
0913   ============================================================================
0914   PIM Context
0915   ============================================================================
0916   This context is selected when either the PIM dialect tag (*!m2pim*) or an
0917   entity indicative of the PIM dialect is found within the source file.
0918   ============================================================================
0919 -->
0920       <context name="PIM" attribute="Plain Source" lineEndContext="#stay">
0921         <!-- Reserved Words -->
0922         <keyword attribute="Keyword" context="#stay" String="pim-keywords"/>
0923 
0924         <!-- Pervasive Constant Identifiers -->
0925         <keyword attribute="Const" context="#stay" String="pim-constants"/>
0926 
0927         <!-- Pervasive Type Identifiers -->
0928         <keyword attribute="Type" context="#stay" String="pim-types"/>
0929 
0930         <!-- Pervasive Procedure Identifiers -->
0931         <keyword attribute="Builtin" context="#stay" String="pim-procedures"/>
0932 
0933         <!-- Pervasive Macro Identifiers and Translations -->
0934         <keyword attribute="Builtin" context="#stay" String="pim-macros"/>
0935 
0936         <!-- Built-in Unsafe Facilities -->
0937         <keyword attribute="Unsafe" context="#stay" String="pim-unsafe"/>
0938 
0939         <!-- Base-16 Whole Number Literals -->
0940         <!-- Base-8 Whole Number and Character Code Literals -->
0941         <RegExpr attribute="Number" context="#stay" String="0[0-9A-F]*H|[0-7]+[BC]"/>
0942 
0943         <!-- Real Number Literals -->
0944         <Float attribute="Number" context="#stay"/>
0945 
0946         <!-- Decimal Whole Number Literals -->
0947         <Int attribute="Number" context="#stay"/>
0948 
0949         <!-- Double-Quoted Character and String Literals -->
0950         <DetectChar attribute="String" context="DoubleQuoted" char="&quot;"/>
0951 
0952         <!-- Single-Quoted Character and String Literals -->
0953         <DetectChar attribute="String" context="SingleQuoted" char="'"/>
0954 
0955         <!-- Opening Pragma Delimiter -->
0956         <StringDetect attribute="Pragma" context="PIM-Pragma" String="(*$"/>
0957 
0958         <!-- Opening Block Comment Delimiter -->
0959         <Detect2Chars attribute="Comment" context="BlockComment"
0960           char="(" char1="*" beginRegion="FoldableComment"/>
0961       </context><!--PIM-->
0962 
0963 <!--
0964   ============================================================================
0965   ISO Context
0966   ============================================================================
0967   This context is selected when either the ISO dialect tag (*!m2iso*) or an
0968   entity indicative of the ISO dialect is found within the source file.
0969   ============================================================================
0970 -->
0971       <context name="ISO" attribute="Plain Source" lineEndContext="#stay">
0972         <!-- Reserved Words -->
0973         <keyword attribute="Keyword" context="#stay" String="iso-keywords"/>
0974 
0975         <!-- Pervasive Constant Identifiers -->
0976         <keyword attribute="Const" context="#stay" String="iso-constants"/>
0977 
0978         <!-- Pervasive Type Identifiers -->
0979         <keyword attribute="Type" context="#stay" String="iso-types"/>
0980 
0981         <!-- Pervasive Procedure Identifiers -->
0982         <keyword attribute="Builtin" context="#stay" String="iso-procedures"/>
0983 
0984         <!-- Pervasive Macro Identifiers and Translations -->
0985         <keyword attribute="Builtin" context="#stay" String="iso-macros"/>
0986 
0987         <!-- Built-in Unsafe Facilities -->
0988         <keyword attribute="Unsafe" context="#stay" String="iso-unsafe"/>
0989 
0990         <!-- Base-16 Whole Number Literals -->
0991         <!-- Base-8 Whole Number and Character Code Literals -->
0992         <RegExpr attribute="Number" context="#stay" String="0[0-9A-F]*H|[0-7]+[BC]"/>
0993 
0994         <!-- Real Number Literals -->
0995         <Float attribute="Number" context="#stay"/>
0996 
0997         <!-- Decimal Whole Number Literals -->
0998         <Int attribute="Number" context="#stay"/>
0999 
1000         <!-- Double-Quoted Character and String Literals -->
1001         <DetectChar attribute="String" context="DoubleQuoted" char="&quot;"/>
1002 
1003         <!-- Single-Quoted Character and String Literals -->
1004         <DetectChar attribute="String" context="SingleQuoted" char="'"/>
1005 
1006         <!-- Opening Pragma Delimiter -->
1007         <Detect2Chars attribute="Pragma"
1008           context="ISO-Pragma" char="&lt;" char1="*"/>
1009 
1010         <!-- Opening Block Comment Delimiter -->
1011         <Detect2Chars attribute="Comment" context="BlockComment"
1012           char="(" char1="*" beginRegion="FoldableComment"/>
1013       </context><!--ISO-->
1014 
1015 <!--
1016   ============================================================================
1017   R10 Context
1018   ============================================================================
1019   This context is selected when either the R10 dialect tag (*!m2r10*) or an
1020   entity indicative of the R10 dialect is found within the source file.
1021   ============================================================================
1022 -->
1023       <context name="R10" attribute="Plain Source" lineEndContext="#stay">
1024         <!-- Reserved Words -->
1025         <keyword attribute="Keyword" context="#stay" String="r10-keywords"/>
1026 
1027         <!-- Built-in Constant Identifiers -->
1028         <keyword attribute="Const" context="#stay" String="r10-constants"/>
1029 
1030         <!-- Built-in Type Identifiers -->
1031         <keyword attribute="Type" context="#stay" String="r10-types"/>
1032 
1033         <!-- Built-in Procedure Identifiers -->
1034         <keyword attribute="Builtin" context="#stay" String="r10-procedures"/>
1035 
1036         <!-- Built-in Macro Identifiers and Translations -->
1037         <keyword attribute="Builtin" context="#stay" String="r10-macros"/>
1038 
1039         <!-- Facilities from Built-in Module UNSAFE -->
1040         <keyword attribute="Unsafe" context="#stay" String="r10-unsafe"/>
1041 
1042         <!-- Base-2 Whole Number Literals -->
1043         <!-- Base-16 Whole Number and Character Code Literals -->
1044         <RegExpr attribute="Number" context="#stay"
1045           String="0b([01]+('[01]+)?)+|0[ux]([0-9A-F]+('[0-9A-F]+)?)+"/>
1046 
1047         <!-- Real Number Literals -->
1048         <Float attribute="Number" context="#stay"/>
1049 
1050         <!-- Decimal Whole Number Literals -->
1051         <RegExpr attribute="Number" context="#stay"
1052           String="([1-9][0-9]*('[0-9]+)*)|0"/>
1053 
1054         <!-- Double-Quoted Character and String Literals -->
1055         <DetectChar attribute="String" context="DoubleQuoted" char="&quot;"/>
1056 
1057         <!-- Single-Quoted Character and String Literals -->
1058         <DetectChar attribute="String" context="SingleQuoted" char="'"/>
1059 
1060         <!-- Opening Pragma Delimiter -->
1061         <Detect2Chars attribute="Pragma"
1062           context="ISO-Pragma" char="&lt;" char1="*"/>
1063 
1064         <!-- Line Comment -->
1065         <DetectChar attribute ="Comment" context="LineComment" char="!"/>
1066 
1067         <!-- Opening Block Comment Delimiter -->
1068         <Detect2Chars attribute="Comment" context="BlockComment"
1069           char="(" char1="*" beginRegion="FoldableComment"/>
1070       </context><!--R10-->
1071 
1072 <!--
1073   ============================================================================
1074   Sub-Contexts
1075   ============================================================================
1076   These contexts are used to process entities that are recognised by their
1077   opening delimiters, such as quoted literals, pragmas and comments.
1078   ============================================================================
1079 -->
1080       <!-- Double-Quoted Literal -->
1081       <context name="DoubleQuoted" attribute="String" lineEndContext="#pop">
1082         <!-- Closing Delimiter -->
1083         <DetectChar attribute="String" context="#pop" char="&quot;"/>
1084       </context>
1085 
1086       <!-- Single-Quoted Literal -->
1087       <context name="SingleQuoted" attribute="String" lineEndContext="#pop">
1088         <!-- CLosing Delimiter -->
1089         <DetectChar attribute="String" context="#pop" char="'" />
1090       </context>
1091 
1092       <!-- PIM Pragma Body -->
1093       <context name="PIM-Pragma" attribute="Pragma" lineEndContext="#stay">
1094         <!-- Closing Delimiter -->
1095         <Detect2Chars attribute="Pragma" context="#pop" char="*" char1=")"/>
1096       </context>
1097 
1098       <!-- ISO Pragma Body -->
1099       <context name="ISO-Pragma" attribute="Pragma" lineEndContext="#stay">
1100         <!-- Closing Delimiter -->
1101         <Detect2Chars attribute="Pragma"
1102           context="#pop" char="*" char1="&gt;"/>
1103       </context>
1104 
1105       <!-- Line Comment Body -->
1106       <context name="LineComment" attribute="Comment" lineEndContext="#pop">
1107         <DetectSpaces />
1108         <IncludeRules context="##Comments"/>
1109       </context>
1110 
1111       <!-- Block Comment Body -->
1112       <context name="BlockComment" attribute="Comment" lineEndContext="#stay">
1113         <!-- Opening Delimiter of Nested Comment -->
1114         <Detect2Chars attribute="Comment" context="BlockComment"
1115           char="(" char1="*" beginRegion="FoldableComment"/>
1116         <!-- Closing Delimiter -->
1117         <Detect2Chars attribute="Comment" context="#pop"
1118           char="*" char1=")" endRegion="FoldableComment"/>
1119 
1120         <DetectSpaces />
1121         <IncludeRules context="##Comments"/>
1122       </context>
1123     </contexts>
1124 
1125 <!--
1126   ============================================================================
1127   Rendering Styles
1128   ============================================================================
1129 -->
1130     <itemDatas>
1131       <!-- Style for Plain Source Text -->
1132       <itemData name="Plain Source"
1133         defStyleNum="dsNormal" bold="0" italic="0"/>
1134 
1135       <!-- Style for Reserved Words -->
1136       <itemData name="Keyword"
1137         defStyleNum="dsKeyword" bold="1" italic="0"/>
1138 
1139       <!-- Style for Pervasive Constant Identifiers -->
1140       <itemData name="Const"
1141         defStyleNum="dsBuiltIn" bold="1" italic="0"/>
1142 
1143       <!-- Style for Pervasive Type Identifiers -->
1144       <itemData name="Type"
1145         defStyleNum="dsDataType" bold="1" italic="0"/>
1146 
1147       <!-- Style for Pervasive Procedure Identifiers -->
1148       <itemData name="Builtin"
1149         defStyleNum="dsBuiltIn" bold="1" italic="0"/>
1150 
1151       <!--  Style for Unsafe Facilities -->
1152       <itemData name="Unsafe"
1153         defStyleNum="dsWarning" bold="1" italic="0"/>
1154 
1155       <!-- Style for Number Literals -->
1156       <itemData name="Number"
1157         defStyleNum="dsDecVal" bold="0" italic="0"/>
1158 
1159       <!-- Style for Quoted Literals -->
1160       <itemData name="String"
1161         defStyleNum="dsString" bold="0" italic="0"/>
1162 
1163       <!-- Style for Dialect Tags -->
1164       <itemData name="DialectTag"
1165         defStyleNum="dsComment" bold="1" italic="0"/>
1166 
1167       <!-- Style for Pragmas -->
1168       <itemData name="Pragma"
1169         defStyleNum="dsPreprocessor" bold="1" italic="0"/>
1170 
1171       <!-- Style for Comments -->
1172       <itemData name="Comment"
1173         defStyleNum="dsComment" bold="0" italic="1"/>
1174 
1175       <!-- Dummy style for testing -->
1176       <itemData name="Dummy" defStyleNum="dsError"/>
1177     </itemDatas>
1178   </highlighting>
1179 
1180   <general>
1181     <keywords casesensitive="1" />
1182     <comments>
1183       <comment name="multiLine" start="(*" end="*)" region="FoldableComment"/>
1184     </comments>
1185   </general>
1186 </language>
1187 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->
1188 <!--EOF-->