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

TooWide
the width (right hand side length) is too big
TooRamose
too much branching
TooRecursive
too much recursion
TooNested
groups are too deeply nested
TooTall
the height (distance from the root) is too big
Lonely
large non-modular grammar
TooModular
too many modules
Greedy
one module that does too much
Lazy
one module that does not do much
TooCoupled
low cohesion and/or high coupling

Lonely Edit!

Related smells: No Subsystems, Insufficient Modularization, Insufficient Modularization

A variant of the well-known Insufficient Modularisation smell, ported to grammars: if the size of a grammar is much larger than expected, the time has come to split it up in modules. Old-fashioned notations did not have any explicit modularisation capabilities and treated a collection of production rules as a set, but modern language workbenches have advanced frameworks with namespaces, dependence management, etc [SLE-2013-ErdwegSVBBCGHKLKMPPSSSVVVWW] [BastenB0KLLPSV15].


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