Languages and machines : an introduction to the theory of computer science
Languages and machines : an introduction to the theory of computer science
Compiler Design Theory
Hi-index | 0.00 |
A grammar is an algebraic system describing the processes by which instances of a language can be constructed. A grammar consists of four elements--a set of metavariables or nonterminal symbols VN (usually called parts of speech when dealing with natural languages); an alphabet VT, (or character set), often called the terminal symbols; a set of rules or productions P, which describe how a sequence of substitutions can be made for each metavariable; and a special metavariable S called the starting or root symbol, which is the starting point for the substitution process to be described below. These four elements are often represented by the quadruple {VN, VT, P, S}.