iXML Community Group Test Suite

23 Oct 2023 (22 Nov 2023)

Top-level catalog for tests in the iXML Community Group Test Suite.

Tests have been contributed from several sources, but the core of the test collection are the tests contributed by Steven Pemberton in December 2021.

Misc tests 3

28 Jun 2022

Grammars 41-60.

Tests compiled manually in 2018 and 2019, re-packaged and extended (supplying test cases where needed) in 2022.

Note that some tests have alternate results for processors operating in non-standard modes, in particular modes in which they tolerate multiple definitions and undefined nonterminals or in which they do not tolerate non-productive nonterminals or unreachable nonterminals.

For a description of the form in which alternate results are recorded, see tests/misc-grammar/test-catalog.xml.

sample.grammar.51

Created 08 Feb 2022 by cmsmcq

A grammar for numbers in scientific notation.

Invisible XML Grammar

{ Sample grammar adapted from Dick Grune and Ceriel J. H. Jacobs,
    Parsing techniques: A practical guide (New York: Ellis Horwood, 1990;
    second edition New York:  Springer, 2008), pp. 89 (1e) and 112 (2e).

    They use this grammar to illustrate CYK parsing.
    "This grammar describes the syntax of numbers in scientific notation."

    Versions of this grammar after elimination of epsilon-rules, 
    after eliminating unit rules, and after further cleanup (elimination
    of unreachable non-terminals) are given in pp. 120-122 of 2e.  I
    have not made test cases from them.  A Chomsky Normal Form equivalent
    is sample grammar 54.
    }

    { Revisions:
    2018-08-09 : CMSMcQ : made first transcription.
    }

    Number: Integer; Real.
    Integer: Digit; Integer, Digit.
    Real: Integer, Fraction, Scale.
    Fraction:  ".", Integer.
    Scale:  "e", Sign, Integer; Empty.
    Digit:  ["0"-"9"].
    Sign:  "+"; "-".
    Empty: .

    {e.g. 32.5e+1 }

    { Hmm.  Required sign for scale? }


    

Test case: g51.c05

Repository URI: …/tests/misc/misc-041-060-catalog.xml

Input string (9 characters)

9978.8024

Expected result

<Number xmlns:ap="http://blackmesatech.com/2019/iXML/Aparecium"
         xmlns:ixml="http://invisiblexml.org/NS"
         xmlns:tc="https://github.com/invisibleXML/ixml/test-catalog">
   <Real>
      <Integer>
         <Integer>
            <Integer>
               <Integer>
                  <Digit>9</Digit>
               </Integer>
               <Digit>9</Digit>
            </Integer>
            <Digit>7</Digit>
         </Integer>
         <Digit>8</Digit>
      </Integer>
      <Fraction>.<Integer>
            <Integer>
               <Integer>
                  <Integer>
                     <Digit>8</Digit>
                  </Integer>
                  <Digit>0</Digit>
               </Integer>
               <Digit>2</Digit>
            </Integer>
            <Digit>4</Digit>
         </Integer>
      </Fraction>
      <Scale>
         <Empty/>
      </Scale>
   </Real>
</Number>