Skip to content

Unexpected behaviour when replacing start symbol of included grammar #281

@viliaapro

Description

@viliaapro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions