productionsregler
Productionsregler, or production rules, are formal rules used in grammars and rewriting systems to replace symbols with other strings of symbols. In a typical formal grammar, a production rule is written as A -> α, where A is a nonterminal symbol and α is a string consisting of terminals and/or nonterminals. The collection of production rules, together with a finite set of terminals and a designated start symbol, defines the language the grammar generates.
There are several classifications of production rules. Context-free production rules have a single nonterminal on the
In use, production rules are applied step by step to derive strings from the start symbol. The
Common examples appear in programming language grammars, where rules like S -> NP VP, NP -> Det N,