1

What is the order of precedence of the *, ?, | and , operators in relaxng compact notation?

For example:

start = element A { B | C , D * }

Which of these, is the above equivalent to?

start = element A { (( B | C ) , D) * }
start = element A { (B | (C , D)) * }
start = element A { (B | C) , (D *) }
start = element A { B | (C , (D *)) }

Where is this documented?

gsamaras
  • 71,951
  • 46
  • 188
  • 305
Andrew Tomazos
  • 66,139
  • 40
  • 186
  • 319
  • See https://www.oasis-open.org/committees/relax-ng/compact-20021121.html#syntax *“There is no notion of operator precedence. It is an error for patterns to combine the `|`, `&`, `,` and `-` operators without using parentheses to make the grouping explicit. For example, `foo | bar, baz` is not allowed; instead, either `(foo | bar), baz` or `foo | (bar, baz)` must be used.”* – sideshowbarker Dec 08 '18 at 01:49

0 Answers0