context-sensitive grammar
Context-sensitive grammar is a type of formal grammar where the production rules depend on the context of the symbols being replaced. In this system, the rules can only be applied if certain conditions are met, meaning that the surrounding symbols influence how a string can be transformed. This makes context-sensitive grammars more powerful than context-free grammars, which do not consider surrounding symbols.
These grammars are used in various fields, including computational linguistics and programming language design. They can describe more complex languages and structures, allowing for a richer representation of syntax and semantics compared to simpler grammar types.