Definition (grammar, language)

A (variable-based) grammar $G$ over $Σ$ is a tuple $(Σ, N, P, S)$ where

Any subset $L\subseteq Σ^\ast$ is a language over $Σ$.

We say a word $w\in Ω^\ast$ is in sentential form if $w$ can be derived from the start symbol $S$.

A sentence is a word $w\in Σ^\ast$ in sentential form.

The language generated by $G$ is the set of all sentences: $$ \begin{align*} \mathcal{L}(G) = Σ^\ast \cap \mathcal{D}(G, S) = \set{w\in Σ^\ast \; | \; S\xrightarrow{G} w}. \end{align*} $$