Combo

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.

Reference

Mats Stijlaart and Vadim Zaytsev. 2017. Towards a taxonomy of grammar smells. In Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2017). ACM, New York, NY, USA, 43-54.


Notation Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.