CoffeeFilter Test Report

Report generated on 06 Aug 2023 at 21:03 with CoffeeFilter version 3.2.1 (using CoffeeGrinder version 3.2.1) from a test suite dated 21 Jun 2022 (20 Jun 2023).

Description

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

Description

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.42

Created 08 Feb 2022 by cmsmcq

Description

Sample grammar 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. 32 (1e) and 23 (2e).

Rules for ws added for convenience; Grune and Jacobs assume the lexer eats whitespace.

Invisible XML Grammar

      Sentence: Name; List, S, "and", S, Name.
      Name: "tom"; "dick"; "harry".
      List: Name, ",", S, List; Name.

      S: " "+.

      { Generates

      tom
      dick
      tom and dick
      tom, dick and harry
      tom, tom, harry and dick

      Does not accept

      tom, dick, harry
      tom and dick and harry
    }

Test case: Grammar test

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

Expected result
<ixml xmlns:ap="http://blackmesatech.com/2019/iXML/Aparecium"
      xmlns:ixml="http://invisiblexml.org/NS"
      xmlns:tc="https://github.com/invisibleXML/ixml/test-catalog">
   <rule name="Sentence">
      <alt>
         <nonterminal name="Name"/>
      </alt>
      <alt>
         <nonterminal name="List"/>
         <nonterminal name="S"/>
         <literal string="and"/>
         <nonterminal name="S"/>
         <nonterminal name="Name"/>
      </alt>
   </rule>
   <rule name="Name">
      <alt>
         <literal string="tom"/>
      </alt>
      <alt>
         <literal string="dick"/>
      </alt>
      <alt>
         <literal string="harry"/>
      </alt>
   </rule>
   <rule name="List">
      <alt>
         <nonterminal name="Name"/>
         <literal string=","/>
         <nonterminal name="S"/>
         <nonterminal name="List"/>
      </alt>
      <alt>
         <nonterminal name="Name"/>
      </alt>
   </rule>
   <rule name="S">
      <alt>
         <repeat1>
            <literal string=" "/>
         </repeat1>
      </alt>
   </rule>
   <comment> Generates

      tom
      dick
      tom and dick
      tom, dick and harry
      tom, tom, harry and dick

      Does not accept

      tom, dick, harry
      tom and dick and harry
    </comment>
</ixml>

Test report

PASS