Terminal and nonterminal symbols

The string "the dog ate the bone" was created using production rules that replaced nonterminal with terminal symbols.[1]

In formal languages, terminal and nonterminal symbols are parts of the vocabulary under a formal grammar. Vocabulary is a finite, nonempty set of symbols. Terminal symbols are symbols that cannot be replaced by other symbols of the vocabulary. Nonterminal symbols are symbols that can be replaced by other symbols of the vocabulary by the production rules under the same formal grammar.[2]

A formal grammar defines a formal language over the vocabulary of the grammar.

In the context of formal language, the term vocabulary is more commonly known as alphabet. Nonterminal symbols are also called syntactic variables.

  1. ^ Rosen, K. H. (2012). Discrete mathematics and its applications. McGraw-Hill. pages 847-851.
  2. ^ Rosen, K. H. (2018). Discrete mathematics and its applications. McGraw-Hill. page 887.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search