<?xml version='1.0' encoding='utf-8'?>
<lgr xmlns="urn:ietf:params:xml:ns:lgr-1.0">
  <meta>
    <version comment="Proposed LGR for Malayalam">3</version>
    <date>2019-04-22</date>
    <unicode-version>6.3.0</unicode-version>
    <language>und-Mlym</language>
    <scope type="domain">.</scope>
    <description type="text/html">
    <![CDATA[
    <h1>Label Generation Rules for Malayalam script</h1>
    <p>Test version using different formulation of context rules - with hopefully same effect, but (somewhat) simpler.</p>
    
    <h2>Overview</h2>    
    <p>This file contains Label Generation Rules (LGR) for the Malayalam script as would be appropriate for the 
    Root zone. For more details on this proposal see "Proposal for a Malayalam Script Root Zone Label Generation Ruleset (LGR) [Proposal]". 
    The format of this file follows [RFC 7940].</p>
   
    <h2>Background of Malayalam Script</h2>
    <p>Malayalam was first written with the Vatteluttu alphabet (വട്ടെഴുത്ത് Vaṭṭeḻuttŭ), which means 'round writing' and developed from the Brahmi script. 
    The oldest known written text in Malayalam is known as the Vazhappalli or Vazhappally inscription, is in the Vatteluttu alphabet and dates from 
    about 830 AD. More details in Section "3 Background on Script and Principal Languages Using It" of the [Proposal].</p>
    
    <h2>Character Classes</h2>
    <p>The basic characters in Malayalam are classified into seven main categories. They are Consonants, Vowels, Matra, Halant, Visargam, 
    Anusvaram and Chillu letters. </p>
    
    <p>Consonant: Malayalam is written in an abugida script derived ultimately from Brāhmī in which 
    every consonant carries an inherent a. More details in Section 3.8, "The Structure of 
    Malayalam Script" of the [Proposal].</p>

    <p>Matra: Vowels other than the inherent vowel are written as vowel diacritics. They are referred to as Matras, 
    when they follow consonants. More details in Section 3.8, "The Structure of Malayalam Script" of the [Proposal].</p>
    
    <p>Halant: A consonant can be combined with another consonant or conjunct 
    using the halant encoded as U+0D4D MALAYALAM SIGN VIRAMA. This strips off the implicit vowel. 
     More details in Section 3.8, "The Structure of Malayalam Script" of the [Proposal].</p>

    <p>Anusvaram: In Malayalam, anusvara represented as ം (0D02), simply represents a consonant /m/ after a vowel, 
    though this /m/ may be assimilated to another nasal consonant. More details in Section 3.8 "The Structure of Malayalam 
    Script" of the [Proposal].</p>

    <p>Visargam: /വിസർഗം,/ (visargam), or visarga, represents a consonant /h/ after a vowel, 
    and is transliterated as ḥ. Like the anusvara, it is a special symbol, and is never followed by an 
    inherent vowel or another vowel. More details in Section 3.8, "The Structure of Malayalam 
    Script" of the [Proposal].</p>

    <p>Chillu: Chillu letters, aka "Chillaksharam", represent pure consonants without any vowel sound. 
    More details in Section 3.8, "The Structure of Malayalam Script" of the [Proposal].</p>
    
    <p>Reordrant: Vowel diacritics, part of which reorder around the preceding character or conjunct. 
    More details in Sections 6.1 "In-script Variants" and 7.1.1 "Variables or definitions" of the [Proposal].</p>    
    <h2>Repertoire</h2>
    <p>According to Section 5, "Repertoire" in [Proposal], the Malayalam LGR contains 70 unique code points.</p>
    <p>The repertoire is based on [MSR-4], which is a subset of Unicode 6.3 [Unicode 6.3].</p>
    <p>Each code-point has associated Glyph, Character Name, Indic Syllabic Category and References.</p>
    
    <h2>Variants</h2>
    <p>According to Section 6 "Variants", in "[Proposal]", this LGR defines one in-script variant due to the multiple ways to write the conjunct 
    “nta" in Malayalam. This LGR also defines the cross-script variants which are "Confusing due to deviation from normally perceived character 
    formations by larger linguistic community". These cases are not of mere visual similarity. These can cause confusion even to a	careful observer 
    and hence being proposed as variants.</p>	
    
    <p>Variant Disposition: All variants are of type &ldquo;blocked&rdquo;, making labels that differ only	by these variants mutually exclusive:  
    whichever label containing either of these variants is chosen earlier, the other one equivalent variant label should be blocked. 
    There is no preference among these variants.</p>

	<p>Context Rules for Variants: some of the variants defined in this LGR are "effective null variants", that is,
    some code points in the source map to "nothing" in the target with all other code points unchanged.
    (Because mappings are symmetric, it does not matter whether it is the forward or reverse mapping that
    maps to "null"). Such variants require a context rule to keep the variant set well-behaved. Symmetry requires
    the same context rule for both forward and reverse mappings.</p>
   
    <p>In other cases, the sequences or code points making up source and target are constrained by context
    rules on the code points. In such a case, any variants require context rules that match the intersection
    between the contexts for both source and target; otherwise a sequence might be considered valid in some
    variant label when it would not be valid in an equivalent context in an original label.</p>
        
    <h2>Whole Label Evaluaton (WLE) rules</h2>
    <h3>Default Whole Label Evaluation Rules</h3>
    <p>The LGR includes the set of required default WLE rules and actions applicable to 
    the Root Zone and defined in [MSR-4]. They are marked with &#x235F;.</p>
    <h3>Malayalam specific Rules</h3>
    <p>These rules have been formulated so that they can be adopted for  LGR specification.</p>
    <p>Following symbols are used in the WLE rules: 
    <br/>C	→	Consonant
    <br/>M 	→	Matra
    <br/>V	→	Vowel
    <br/>B	→	Anusvara
    <br/>X	→	Visarga 
    <br/>D	→	Chandrabindu
    <br/>H	→	Halant
    <br/>L	→	Chillu
    <br/>R	→	Reordrant Matra
    </p>
    <p>Note: the Reordrant Matras include one sequence. That requires an auxiliary rule R in addition to class R.</p>
    
    <p>The rules are: </p>
    <ul>
    	<li>1. H: must be preceded by C or U+0D41 or U+07DB</li>
	    <li>2. M: must be preceded by C</li>
    	<li>3. B: must be preceded by C, V or M</li>
    	<li>4. X: must be preceded by C, V or M</li>
    	<li>5. L: cannot be preceded by B, X or H</li>
    	<li>6. A label does not begin with L</li> 
    </ul>
    <p>The following context rules  apply to code points U+0D33 and U+0D31 as well as to sequences ending in these code points:</p>
    <ul>
    	<li>7. The character ള (0D33) cannot immediately follow ള (0D33), except as part of a defined sequence</li>
      <li>8. The character റ (0D31) cannot immediately follow റ (0D31), except as part of a defined sequence</li>
    </ul>
    <p>The following context rules apply to variants:</p>
    <ul>
        <li>V1: A variant preceded by 0D33+Halant or followed by R or Halant+0D33 is not defined</li>
        <li>V2: A variant preceded by 0D31+Halant or followed by R or Halant+0D31 is not defined</li>
    </ul>
    
    <p>More details in Section 6.1 "In-script Variants" and Section 7, "Whole Label Evaluation Rules (WLE)" of the [Proposal]</p>
	<p>Note: the implementation of Rules 7 & 8 relies on the fact that a context rule is not evaluated between code points in the same sequence. 
	For example, if a label contains two adjacent U+0D33 U+0D33 surrounded by other code points , the two code points can only be interpreted 
	as the sequence U+0D33 U+0D33 ളള because a singleton U+0D33  ള  is not allowed to be followed by another U+0D33 ള.
	</p>
    
    <h2>Overall Development Process and Methodology</h2>
    <p>Under the Neo-Brahmi Generation Panel, there are many different scripts belonging to separate Unicode blocks. 
    Each of these scripts will be assigned a separate LGR; however Neo-Brahmi GP will ensure that the fundamental philosophy 
    behind building those LGRs are all in sync with all other Brahmi derived scripts. 
    This is the Malayalam LGR, which caters to Malayalam language written using the Malayalam script.</p>
    
    <h2>References</h2> 
    <p>Following references are cited in this document:</p>
    <dl class="references">
    <dt>[MSR-4]</dt>
    <dd>Integration Panel, "Maximal Starting Repertoire — MSR-4 Overview and Rationale", 7 February 2018, 
    https://www.icann.org/en/system/files/files/msr-4-overview-25jan19-en.pdf</dd> 
    
     <dt>[Proposal]</dt> <dd></dd><dd>Neo-Brahmi Generation Panel, "Proposal for a Malayalam Script Root Zone Label Generation Ruleset (LGR)", 22 April 2019, https://www.icann.org/en/system/files/files/proposal-malayalam-lgr-22apr19-en.pdf</dd>
     <dt>[RFC 7940]</dt><dd>Davies, K. and A. Freytag, "Representing Label Generation Rulesets Using XML", RFC 7940, August 2016, http://www.rfc-editor.org/info/rfc7940. </dd>
     <dt>[Unicode 6.3]</dt><dd>The Unicode Consortium. The Unicode Standard, Version 6.3.0, (Mountain View, CA: The Unicode Consortium, 2013. ISBN 978-1-936213-08-5), http://www.unicode.org/versions/Unicode6.3.0/</dd></dl>
     
     ]]></description>
    <references>
      <reference id="106">Omniglot, "Malayalam (മലയാളം):" https://www.omniglot.com/writing/malayalam.htm (Accessed on 5th July, 2018)</reference>
    </references>
  </meta>
  <data>
    <char comment="not part of repertoire" cp="0B20">
      <var comment="Out of repertoire" cp="0B20" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D20" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0B9C">
      <var comment="Out of repertoire" cp="0B9C" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D1C" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0BAE">
      <var comment="Out of repertoire" cp="0BAE" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D25" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0BB5">
      <var comment="Out of repertoire" cp="0BB5" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D16" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0BBF">
      <var comment="Out of repertoire" cp="0BBF" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D3F" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0BC6">
      <var comment="Out of repertoire" cp="0BC6" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D46" type="blocked"/>
    </char>
    <char comment="not part of repertoire" cp="0BC7">
      <var comment="Out of repertoire" cp="0BC7" type="out-of-repertoire-var"/>
      <var comment="cross-script homoglyph" cp="0D47" type="blocked"/>
    </char>
    <char comment="MALAYALAM SIGN ANUSVARA" cp="0D02" ref="106" tag="Anusvaram" when="follows-C-V-or-M"/>
    <char comment="MALAYALAM SIGN VISARGA" cp="0D03" ref="106" tag="Visargam" when="follows-C-V-or-M"/>
    <char comment="MALAYALAM LETTER A" cp="0D05" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER AA" cp="0D06" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER I" cp="0D07" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER II" cp="0D08" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER U" cp="0D09" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER UU" cp="0D0A" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER VOCALIC R" cp="0D0B" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER E" cp="0D0E" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER EE" cp="0D0F" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER AI" cp="0D10" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER O" cp="0D12" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER OO" cp="0D13" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER AU" cp="0D14" ref="106" tag="Vowel"/>
    <char comment="MALAYALAM LETTER KA" cp="0D15" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER KHA" cp="0D16" ref="106" tag="Consonant">
      <var comment="cross-script homoglyph" cp="0BB5" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER GA" cp="0D17" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER GHA" cp="0D18" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER NGA" cp="0D19" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER CA" cp="0D1A" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER CHA" cp="0D1B" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER JA" cp="0D1C" ref="106" tag="Consonant">
      <var comment="cross-script homoglyph" cp="0B9C" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER JHA" cp="0D1D" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER NYA" cp="0D1E" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER TTA" cp="0D1F" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER TTHA" cp="0D20" ref="106" tag="Consonant">
      <var comment="cross-script homoglyph" cp="0B20" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER DDA" cp="0D21" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER DDHA" cp="0D22" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER NNA" cp="0D23" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER TA" cp="0D24" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER THA" cp="0D25" ref="106" tag="Consonant">
      <var comment="cross-script homoglyph" cp="0BAE" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER DA" cp="0D26" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER DHA" cp="0D27" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER NA" cp="0D28" ref="106" tag="Consonant"/>
    <char cp="0D28 0D4D 0D31" not-when="follows-B-X-or-H" ref="106">
      <var cp="0D7B 0D31" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER PA" cp="0D2A" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER PHA" cp="0D2B" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER BA" cp="0D2C" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER BHA" cp="0D2D" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER MA" cp="0D2E" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER YA" cp="0D2F" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER RA" cp="0D30" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER RRA" cp="0D31" not-when="follows-0D31" ref="106" tag="Consonant"/>
    <char cp="0D31 0D31" not-when="follows-0D31">
      <var cp="0D31 0D4D 0D31" not-when="follows-0D31-0D4D-or-followed-by-0D4D-0D31-or-R" type="blocked"/>
    </char>
    <char cp="0D31 0D4D 0D31" not-when="follows-0D31">
      <var cp="0D31 0D31" not-when="follows-0D31-0D4D-or-followed-by-0D4D-0D31-or-R" type="blocked"/>
    </char>
    <char cp="0D31 0D31 0D4D 0D31" not-when="follows-0D31">
      <var cp="0D31 0D4D 0D31 0D31" not-when="followed-by-R" type="blocked"/>
    </char>
    <char cp="0D31 0D4D 0D31 0D31" not-when="follows-0D31">
      <var cp="0D31 0D31 0D4D 0D31" not-when="followed-by-R" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER LA" cp="0D32" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER LLA" cp="0D33" not-when="follows-0D33" ref="106" tag="Consonant"/>
    <char cp="0D33 0D33" not-when="follows-0D33">
      <var cp="0D33 0D4D 0D33" not-when="follows-0D33-0D4D-or-followed-by-0D4D-0D33-or-R" type="blocked"/>
    </char>
    <char cp="0D33 0D4D 0D33" not-when="follows-0D33">
      <var cp="0D33 0D33" not-when="follows-0D33-0D4D-or-followed-by-0D4D-0D33-or-R" type="blocked"/>
    </char>
    <char cp="0D33 0D33 0D4D 0D33" not-when="follows-0D33">
      <var cp="0D33 0D4D 0D33 0D33" not-when="followed-by-R" type="blocked"/>
    </char>
    <char cp="0D33 0D4D 0D33 0D33" not-when="follows-0D33">
      <var cp="0D33 0D33 0D4D 0D33" not-when="followed-by-R" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER LLLA" cp="0D34" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER VA" cp="0D35" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER SHA" cp="0D36" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER SSA" cp="0D37" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER SA" cp="0D38" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM LETTER HA" cp="0D39" ref="106" tag="Consonant"/>
    <char comment="MALAYALAM VOWEL SIGN AA" cp="0D3E" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN I" cp="0D3F" ref="106" tag="Matra" when="follows-C">
      <var comment="cross-script homoglyph" cp="0BBF" type="blocked"/>
    </char>
    <char comment="MALAYALAM VOWEL SIGN II" cp="0D40" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN U" cp="0D41" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN UU" cp="0D42" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN VOCALIC R" cp="0D43" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN E" cp="0D46" ref="106" tag="Matra R" when="follows-C">
      <var comment="cross-script homoglyph" cp="0BC6" type="blocked"/>
    </char>
    <char comment="MALAYALAM VOWEL SIGN EE" cp="0D47" ref="106" tag="Matra R" when="follows-C">
      <var comment="cross-script homoglyph" cp="0BC7" type="blocked"/>
    </char>
    <char comment="MALAYALAM VOWEL SIGN AI" cp="0D48" ref="106" tag="Matra R" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN O" cp="0D4A" ref="106" tag="Matra R" when="follows-C"/>
    <char comment="MALAYALAM VOWEL SIGN OO" cp="0D4B" ref="106" tag="Matra R" when="follows-C"/>
    <char comment="MALAYALAM SIGN VIRAMA" cp="0D4D" ref="106" tag="Halant" when="follows-C-or-0D41-or-0D7B"/>
    <char comment="MALAYALAM AU LENGTH MARK" cp="0D57" ref="106" tag="Matra" when="follows-C"/>
    <char comment="MALAYALAM LETTER CHILLU NN" cp="0D7A" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
    <char comment="MALAYALAM LETTER CHILLU N" cp="0D7B" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
    <char cp="0D7B 0D31" not-when="follows-B-X-or-H" ref="106">
      <var cp="0D28 0D4D 0D31" type="blocked"/>
    </char>
    <char comment="MALAYALAM LETTER CHILLU RR" cp="0D7C" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
    <char comment="MALAYALAM LETTER CHILLU L" cp="0D7D" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
    <char comment="MALAYALAM LETTER CHILLU LL" cp="0D7E" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
    <char comment="MALAYALAM LETTER CHILLU K" cp="0D7F" not-when="follows-B-X-or-H" ref="106" tag="Chillu"/>
  </data>
  
  <rules>

    <class name="C" from-tag="Consonant" comment="Any consonant"/>
    <class name="V" from-tag="Vowel" comment="Any independent vowel"/>
    <class name="M" from-tag="Matra" comment="Any vowel sign (matra)"/>
    <class name="H" from-tag="Halant" comment="The Halant/Virama"/>
    <class name="B" from-tag="Anusvaram" comment="The Anusvaram"/>
    <class name="X" from-tag="Visargam" comment="The Visargam"/>
    <class name="L" from-tag="Chillu" comment="Any consonant without any vowel sound"/>
    <class name="R" from-tag="R" comment="Any reordrant vowel sign" />
    <rule name="leading-combining-mark" comment="Default rule from MSR-4 ⍟">
      <start/>
      <union>
        <class property="gc:Mn"/>
        <class property="gc:Mc"/>
      </union>
    </rule>

    <rule name="follows-C-or-0D41-or-0D7B" comment="Section 7, WLE 1: Rule 1: H must be preceded by C or 0D41 or 0D7B">
      <look-behind>
      	<choice>
		  <class by-ref="C"/>
		  <char cp="0D41" comment="MALAYALAM VOWEL SIGN U"/>
		  <char cp="0D7B" comment="MALAYALAM LETTER CHILLU N"/>
		</choice>
      </look-behind>
      <anchor/>
    </rule>
    <rule name="follows-C" comment="Section 7, WLE 2: M must be preceded by C">
      <look-behind>
        <class by-ref="C"/>
      </look-behind>
      <anchor/>
    </rule>
    <rule name="follows-C-V-or-M" comment="Section 7, WLE 3: B must be preceded by C, V or M and WLE 4: X must be preceded by C, V or M">
      <look-behind>
        <choice>
          <class by-ref="C"/>
          <class by-ref="V"/>
          <class by-ref="M"/>
        </choice>
      </look-behind>
      <anchor/>
    </rule>
    <rule name="follows-B-X-or-H" comment="Section 7, WLE 5: L cannot be preceded by B, X or H">
      <look-behind>
        <choice>
          <class by-ref="B"/>
          <class by-ref="X"/>
          <class by-ref="H"/>
        </choice>
      </look-behind>
      <anchor/>
    </rule>
    <rule name="begins-with-L" comment="Section 7, WLE 6: Label does not begin with L">
      <start/>
      <class by-ref="L"/>
    </rule>
    <rule name="follows-0D33" comment="Section 7, WLE 7. The character ള (0D33) cannot immediately follow ള (0D33), except as part of a defined sequence">
      <look-behind>
        <char cp="0D33"/>
      </look-behind>
      <anchor/>
    </rule>    
    <rule name="follows-0D31" comment="Section 7, WLE 8. The character റ (0D31) cannot immediately follow റ (0D31), except as part of a defined sequence">
			<look-behind>
				<char cp="0D31"/>
			</look-behind>
			<anchor/>
		</rule>
    <rule name="reordrant-matra" comment="Reordrant matras, including sequence U+0D4D U+0D30">
      <choice>
         <class by-ref="R" />
         <char cp="0D4D 0D30" />
      </choice>
    </rule>
    <rule name="followed-by-R" comment="variant not defined if followed by reordrant matra">
     <anchor/>
     <look-ahead>
         <rule by-ref="reordrant-matra"/>
     </look-ahead>
    </rule>
		    <rule name="follows-0D33-0D4D-or-followed-by-0D4D-0D33-or-R" comment="Section 6.1, V1: variant not defined if preceded by 0D33+Halant or followed by Halant+0D33 or R">
			<choice>
				<rule>
					<look-behind>
						<char cp="0D33 0D4D"/>
					</look-behind>
					<anchor/>
				</rule>
				<rule>
					<anchor/>
					<look-ahead>
					  <choice>
						  <char cp="0D4D 0D33"/>
    				  <rule by-ref="reordrant-matra"/>
    				</choice>
					</look-ahead>
				</rule>
			</choice>
		</rule>
    <rule name="follows-0D31-0D4D-or-followed-by-0D4D-0D31-or-R" comment="Section 6.1, V2: variant not defined if preceded by 0D31+Halant or followed by Halant+0D31 or R">
  <choice>
    <rule>
      <look-behind>
        <char cp="0D31 0D4D"/>
      </look-behind>
      <anchor/>
    </rule>
    <rule>
      <anchor/>
      <look-ahead>
        <choice>
          <char cp="0D4D 0D31"/>
          <rule by-ref="reordrant-matra"/>
        </choice>
      </look-ahead>
    </rule>
  </choice>
</rule>
    <action disp="invalid" match="leading-combining-mark" comment="labels with leading combining marks are invalid &amp;#x235F;"/>
    <action disp="invalid" match="begins-with-L" comment="Section 7, WLE 6: Label does not begin with L"/>
    <action disp="invalid" any-variant="out-of-repertoire-var" comment="any variant label with a code point out of repertoire is invalid ⍟"/>
    <action disp="blocked" any-variant="blocked" comment="default action MSR-4 ⍟"/>
    <action disp="allocatable" any-variant="allocatable" comment="default action MSR-4 ⍟"/>
    <action disp="valid" comment="catch all; default action from MSR-4 ⍟"/>
  </rules>
</lgr>
