Re: ixampl now supports insertions

BR Chrisman <brchrisman@gmail.com> writes:
> Is there an XML format for the ixml referenced here?

Sure. You can get the xml format for any ixml grammar by parsing it with
the ixml grammar for ixml.

<ixml>
   <rule name="numbers">
      <alt>
         <nonterminal mark="@" name="source"/>
         <repeat0>
            <nonterminal name="n"/>
            <sep>
               <literal tmark="-" string=", "/>
            </sep>
         </repeat0>
      </alt>
   </rule>
   <rule name="source">
      <alt>
         <insertion string="ixml"/>
      </alt>
   </rule>
   <rule name="n">
      <alt>
         <nonterminal name="neg"/>
      </alt>
      <alt>
         <nonterminal name="pos"/>
      </alt>
   </rule>
   <rule mark="-" name="neg">
      <alt>
         <literal tmark="-" string="("/>
         <insertion string="-"/>
         <repeat1>
            <nonterminal name="d"/>
         </repeat1>
         <literal tmark="-" string=")"/>
      </alt>
   </rule>
   <rule mark="-" name="pos">
      <alt>
         <insertion string="+"/>
         <repeat1>
            <nonterminal name="d"/>
         </repeat1>
      </alt>
   </rule>
   <rule mark="-" name="d">
      <alt>
         <inclusion>
            <member from="0" to="9"/>
         </inclusion>
      </alt>
   </rule>
</ixml>

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Thursday, 28 July 2022 06:46:33 UTC