Skip to content

iXML tests involving an earlier version of the spec. #266

@johnlumley

Description

@johnlumley

The 'ixml' tests in the test suite (see ixml tests) use an earlier version of the spec as sample grammar (and input). The main difference is in the definition of string, which in the 2022 spec is:

@string: -'"', dchar+, -'"';
               -"'", schar+, -"'".
        dchar: ~['"'; #a; #d];
               '"', -'"'. {all characters except line breaks; quotes must be doubled}
        schar: ~["'"; #a; #d];
               "'", -"'". {all characters except line breaks; quotes must be doubled}

but in the tests is:

string: -'"', dstring, -'"', s;
               -"'", sstring, -"'", s.
     @dstring: dchar+.
     @sstring: schar+.
        dchar: ~['"'; #a; #d];
               '"', -'"'. {all characters except line breaks; quotes must be doubled}
        schar: ~["'"; #a; #d];
               "'", -"'". {all characters except line breaks; quotes must be doubled}

Whilst of course the test grammar is perfectly valid, it can cause confusion as being considered the current (or stable) version of the iXML specification grammar (I used that as a sample in doing some work on my workbench and puzzled on the result).

I suggest either updating these tests to the stable version, or very prominently marking them as NOT THE OFFICIAL iXML GRAMMAR, probably in an initial comment and perhaps in the test name as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions