Skip to content

In the EBNF, use explicit separator syntax #1366

@michaelhkay

Description

@michaelhkay

We could pick up the ++ and ** operators from Invisible XML for defining "a sequence of [one|zero] or more Xs separated by Ys".

So for example

Annotation ::= "%"  EQName ("("  AnnotationValue ("," AnnotationValue)* ")")?

changes to

Annotation ::= "%"  EQName ("("  (AnnotationValue ++ ",") ")")?

and

TypedFunctionTest ::= ("function" | "fn") "(" (SequenceType ("," SequenceType)*)? ")" "as" SequenceType

becomes

TypedFunctionTest ::= ("function" | "fn") "(" (SequenceType ** ",") ")" "as" SequenceType

Note that there is an impact on anyone who uses the machine-readable XML version of our grammar. However, the current version could easily be generated by preprocessing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorialMinor typos, wording clarifications, example fixes, etc.XPathAn issue related to XPathXQueryAn issue related to XQuery

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions