A context-sensitive grammar is a type of grammar that generates precisely the context-sensitive languages.
Context-sensitive grammars are grammars where each rule has the form
xAy -> xwy
Where A is a nonterminal and x, y, and z are strings of terminals and nonterminals.