- Tech know how online

Production rule

A production rule is a basic set of rules of a formal grammar and is used to produce a formal language. There are other names for the term production rule: Production, Rule or also Replacement Rule. With production system one designates a defined set of production rules. Production rules are used among other things in the computer linguistics or in the compiler construction for the description of a formal language.

A production rule is defined as a two-character relation (u,v) written in pairs in the notation u after v. The characteristic of this relation specifies that

  • the left side consists of a nonterminal and
  • the right side consists of either the empty word, as the end of a derivation sequence, or a terminal followed by a nonterminal.
Terminals are the basic elements of the sentences of a formal language, and cannot be decomposed further. They include letters and digits in addition to the elements of the particular programming language. Examples of the terminal elements of a programming language are:

T = {=, :=, begin, end, while, repeat, if ....}

Nonterminals, on the other hand, denote a syntactic category; they are essentially auxiliary symbols used for the generation and recognition of formal language sentences by the grammar. To distinguish them, nonterminals are represented in.

Englisch: Production rule
Updated at: 09.04.2012
#Words: 209
Links: formal grammar, formal language, system, computer, compiler
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2024