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

Convention
violations of visual policies
Notation
metalanguage-related
Parsing
parsing techniques related smells
Duplication
the same fragment is repeated

Echo
same rule occurs twice or more
Clone
same right hand side occurs twice or more
Foldable
nonterminal's right hand side is not unique
Common
common subexpressions
Permuted
permutations in commutative combinators
Lookalike
near-clones

Clone Edit!

Related smells: Duplicate Code, Reinvent the Wheel, Cut and Paste Programming, Unfactored Hierarchy, Duplicate Entity

Nonterminals that have exactly the same definitions, are only cluttering the grammar, and can be painlessly united. In clone management research, these are called “type 1 clones”, we will revisit this classification later when defining Lookalike.


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