Vadim Zaytsev aka @grammarware

GraSs: A Taxonomy of Grammar Smells


Organisation
global problems
Navigation
problems with navigating through the grammar
Structure
harmful relationships among grammar components

Proxy
indirect uses
Dependency
antipatterns in use
Complexity
metric-based smells

Diamond
A is X and B is X, but C is A or B
Rivalry
overlapping alternatives
Ouroboros
a circular dependency among modules
Soulmates
nonterminals or modules are always changed together
Spillover
a nonterminal that is too linked to the adjacent symbols
Mythic
an alternative that is never exercised in the codebase

Spillover Edit!

Related smells: Unstable Interface, Incomplete Library Class

Spillover happens when some symbols that should have been a part of the nonterminal definition, are not included in its right hand side, and appended every time to its use. This creates a co-change relationship between the nonterminal and the context of its use. If every time a definition of a nonterminal is changed in a particular way, all occurrences of the same nonterminal needs to be updated, this smell is detected.


The GraSs taxonomy is a joint effort maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Page last updated in March 2021.
XHTML 1.1 CSS 3