Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unexpected behaviour when replacing start symbol of included grammar #281

Open
viliaapro opened this issue Sep 29, 2023 · 0 comments
Open

Comments

@viliaapro
Copy link

viliaapro commented Sep 29, 2023

Gentle people,
I've found an unexpected behaviour in both Jing and Emacs's RNG-validator; the operators |= and &= work just like = when used on the start symbol of an included grammar.
Given three files, foo.rnc, bar.rnc and foo.xml, the command jing -c foo.rnc foo.xml succeeds but jing -c bar.rnc foo.xml fails.

<!-- foo.xml -->
<foo/>
# foo.rnc
start	= foo
foo	= element foo {empty}
# bar.rnc
bar = element bar {empty}

start =
    grammar {
    include "foo.rnc"
	{ start |= parent bar }
    }

Replacing |= with &= produces the same error: it is as if there was as replacement start = parent bar.

Best regards and thanks,
Vili Aapro

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

No branches or pull requests

1 participant