This smell is designed to recognise production rules which are too wide—that is, their right hand side is too long. There could be at least three ways to define what is “too long”: 1) The number of consequent terminals is too high, which is harmful because long streaks of consequent terminals obscure the syntactic structure. 2) The number of nonterminals is too high, which is harmful because it requires knowledge about referenced nonterminals to debug a grammar (so we should not count preterminals). 3) The number of metasymbols (stars, optionals, crosses, separator lists and other combinators) is too high, which is harmful because the importance of knowing the notation is stressed when a grammar engineer needs to understand such a production rule.
Related smells: Throwaway
All rights reserved (c) Tushar Sharma 2017-23.