Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
johnlumley opened this issue Aug 8, 2024 · 0 comments
Open

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

johnlumley opened this issue Aug 8, 2024 · 0 comments

Comments

@johnlumley
Copy link
Contributor

johnlumley commented Aug 8, 2024

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant