> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/600-toc/621-grammar/terminals-and-nonterminals.md).

# Terminal and nonterminal symbols

<https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols>

Terminal and nonterminal symbols are the *lexical elements* used in specifying the *production rules* constituting a *formal grammar*.

**Terminal symbols** are the *elementary symbols* of the language defined by a formal grammar.

**Nonterminal symbols**, or *syntactic variables*, are replaced by groups of terminal symbols according to the production rules.

The terminals and nonterminals of a particular grammar are disjoint sets.
