ConfusingEntry

StartInTheMiddle addresses positioning of the starting symbol of the grammar, but there can be three more problems with it. (1) Some grammars do not have any start specified at all, having it to be inferred by heuristics (e.g., the only top nonterminal). (2) There can be multiple starts, especially for notations that exceed classic CFGs. This can indicate several independent grammars that got merged into one, or just several entry points into the grammar (which would allow, for example, to parse statements or expressions out of context—it is a not quite challenging exercise in theory, but extremely useful in practical grammarware engineering when integrating software languages with an IDE and a debugger). (3) The root symbol is properly marked as such, but is also referenced from other nonterminals in the grammar (so the starting symbol is not a top nonterminal).

Related smells: StartInTheMiddle

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.


Shortage Smells

Home

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