These rules seem to work:
a) separators and terminators are collectively
called 'terminating markup'.
b) initiators are not 'terminating markup'
c) when two items of in-scope terminating
markup have a common prefix, the parser must give precedence to the longest
item.
d) when two items of in-scope terminating
markup have exactly the same value, the parser must give precedence to
the innermost ( most deeply nested ) item.
e) when the separator and terminator
on a group have exactly the same value, the parser must give precedence
to the separator.
If an initiated component can occur
at the same point as an item of terminating markup, the initiator takes
precedence.
regards,
Tim Kimber, Common Transformation Team,
Hursley, UK
Internet: kimbert@uk.ibm.com
Tel. 01962-816742
Internal tel. 246742
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU