Grammar combinators (metasymbols of arity 1 and up) such as the Kleene star and cross, or an optional, can be combined in an improper way. For example, a grammar engineer who defines A ::= B?; and B ::= C?;, may mean well, but creates a confusing contract if A is used to bind a textual structure with a tree structure: it is ambiguous what an empty string corresponds to—an empty node A or a node A containing an empty node B.
All rights reserved (c) Tushar Sharma 2017-23.