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

Weak Edit!

Related smells: Incomplete Abstraction, Unnecessary Abstraction, Unnecessary Abstraction, Compound Attribute, Multicolumn Attribute

When the right hand side of a nonterminal is formed from several symbols that happen to occur one after another, without forming a proper abstraction, this can hinder grammar's understanding. The terminology is borrowed from [McCord1985] which distinguished strong nonterminals (used during parsing and present in the resulting tree) from weak ones (used during parsing but flattened into single nodes in the tree).


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