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.54bis
Created 18 Jun 2022 by cmsmcq
The same grammar in Chomsky Normal Form as grammar 54, for numbers in scientific notation, but with different ixml markings, to see whether CNF makes it harder to make the resulting XML look plausible.
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. 99 (1e) and 123 (2e).
This is a Chomsky Normal Form version of sample grammar 51; its
primary interest for testing ixml parsers is its opacity.
}
{ Revisions:
2022-06-10 : CMSMcQ : hide some symbols in the output
2018-08-10 : CMSMcQ : correct syntax error found by DCG parser
2018-08-09 : CMSMcQ : made first transcription.
}
Number: ["0" - "9"]
; -Integer, -Digit
; -N1, Scale1
; Integer, Fraction.
-N1: Integer, Fraction.
Integer: ['0' - '9']; -Integer, -Digit.
Fraction: -T1, -Integer.
-T1 : ".".
Scale1: -N2, Integer.
-N2: -T2, Sign.
-T2: "e".
-Digit: ['0'-'9'].
Sign: ["+"; '-' ].
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">
<comment> 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. 99 (1e) and 123 (2e).
This is a Chomsky Normal Form version of sample grammar 51; its
primary interest for testing ixml parsers is its opacity.
</comment>
<comment> Revisions:
2022-06-10 : CMSMcQ : hide some symbols in the output
2018-08-10 : CMSMcQ : correct syntax error found by DCG parser
2018-08-09 : CMSMcQ : made first transcription.
</comment>
<rule name="Number">
<alt>
<inclusion>
<member from="0" to="9"/>
</inclusion>
</alt>
<alt>
<nonterminal mark="-" name="Integer"/>
<nonterminal mark="-" name="Digit"/>
</alt>
<alt>
<nonterminal mark="-" name="N1"/>
<nonterminal name="Scale1"/>
</alt>
<alt>
<nonterminal name="Integer"/>
<nonterminal name="Fraction"/>
</alt>
</rule>
<rule mark="-" name="N1">
<alt>
<nonterminal name="Integer"/>
<nonterminal name="Fraction"/>
</alt>
</rule>
<rule name="Integer">
<alt>
<inclusion>
<member from="0" to="9"/>
</inclusion>
</alt>
<alt>
<nonterminal mark="-" name="Integer"/>
<nonterminal mark="-" name="Digit"/>
</alt>
</rule>
<rule name="Fraction">
<alt>
<nonterminal mark="-" name="T1"/>
<nonterminal mark="-" name="Integer"/>
</alt>
</rule>
<rule mark="-" name="T1">
<alt>
<literal string="."/>
</alt>
</rule>
<rule name="Scale1">
<alt>
<nonterminal mark="-" name="N2"/>
<nonterminal name="Integer"/>
</alt>
</rule>
<rule mark="-" name="N2">
<alt>
<nonterminal mark="-" name="T2"/>
<nonterminal name="Sign"/>
</alt>
</rule>
<rule mark="-" name="T2">
<alt>
<literal string="e"/>
</alt>
</rule>
<rule mark="-" name="Digit">
<alt>
<inclusion>
<member from="0" to="9"/>
</inclusion>
</alt>
</rule>
<rule name="Sign">
<alt>
<inclusion>
<member string="+"/>
<member string="-"/>
</inclusion>
</alt>
</rule>
</ixml>