Re: A BibTeX grammar

John Lumley <john@saxonica.com> writes:
> Might this not be a case where parsing into XML might give some useful
> insight… if so how might the ‘sensitivity’ be indicated?

Indeed, John! It is difficult to missunderstand the XML version!

   <rule name="entry">
      <alt>
         <literal tmark="-" string="@"/>
         <nonterminal mark="@" name="type"/>
         <repeat0>
            <nonterminal name="s"/>
         </repeat0>
         <literal tmark="-" string="{"/>
         <repeat0>
            <nonterminal name="s"/>
         </repeat0>
         <nonterminal mark="@" name="citekey"/>
         <option>
            <nonterminal name="fields"/>
         </option>
         <repeat0>
            <nonterminal name="s"/>
            <sep>
               <literal tmark="-" string="}"/>
            </sep>
         </repeat0>
      </alt>
   </rule>

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Friday, 18 February 2022 07:48:54 UTC