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

Chain
right hand side is a nonterminal
Throwaway
a nonterminal used only once
Weak
a nonterminal does not form a proper abstraction
Ghost
a subexpression that should have been a nonterminal
Multitool
a nonterminal that represents two or more concepts

Throwaway Edit!

Related smells: List-like Inheritance Hierarchy, Poltergeist, Imperative Abstraction, Tree-like Dependency Graph

A nonterminal that is used only once, may be useful to tame the length of production rules (see TooWide), and may occasionally convey a useful abstraction with its name, but beyond those circumstances it is a smell and should be a candidate for refactoring.


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