Part of a series on |
Formal languages |
---|
In mathematical logic, formation rules are rules for describing which strings of symbols formed from the alphabet of a formal language are syntactically valid within the language.[1] These rules only address the location and manipulation of the strings of the language. It does not describe anything else about a language, such as its semantics (i.e. what the strings mean). (See also formal grammar).
Specifying the syntax of any language L follows a common pattern. First a set of symbols is given, and we define an L-expression to be any finite sequence of these symbols. Then we specify one or more sets of L-expressions which we regard as meaningful. The meaningful expressions are generally described as those constructed by following certain rules or algorithms, and the set of them is characterized as the smallest set of expressions which is closed under these formation rules.