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

13 Jun 2022

Grammars 1-20.

Tests compiled manually in 2018 and 2019, re-packaged in 2022.

Moved to ixml test collection, June 2022.

sample.grammar.04

Created 08 Feb 2022 by cmsmcq

A more or less conventional grammar for four-operation arithmetic expressions over literal integers, from Loup Vaillant's tutorial on Earley parsing.

Invisible XML Grammar

{ Sample grammar 4, taken from

  http://loup-vaillant.fr/tutorials/earley-parsing/what-and-why

Revisions:

  2018-08-10 : CMSMcQ : correct syntax error caught by DCG parser.
  2018-03-29 : CMSMcQ : copied from net, translated into ixml
}

{
Sum     = Sum     [+-] Product
        | Product
Product = Product [*/] Factor
        | Factor
Factor  = '(' Sum ')'
        | Number
Number  = [0-9]+
}

Sum: Sum, SOp, Product; Product.
SOp: ["+"; "-"].
Product:  Product, POp, Factor; Factor.
POp: ["*"; "/"].
Factor: "(", Sum, ")"; Number.
Number: ["0"-"9"]+.

Test case: g04.c05

Repository URI: …/tests/misc/misc-001-020-catalog.xml

Input string (6 characters)

42-3/7

Expected result

<Sum>
   <Sum>
      <Product>
         <Factor>
            <Number>42</Number>
         </Factor>
      </Product>
   </Sum>
   <SOp>-</SOp>
   <Product>
      <Product>
         <Factor>
            <Number>3</Number>
         </Factor>
      </Product>
      <POp>/</POp>
      <Factor>
         <Number>7</Number>
      </Factor>
   </Product>
</Sum>