2.2 Productions

A production specifies a particular rule of a formal language. A formal language is specified by a finite number of productions.

2.2.1 The “left arrow”

A production is separated into two sides by a “left arrow”. When it is possible, the actual left arrow can be used. However, more often than not, productions are specified in plain text files. As a result, the equivalent notation ::= (colon-colon-equal) is used instead.

2.2.2 The right/left hand side

The right hand side (RHS) of a production specifies a pattern to match. The left ahnd side (LHS) of a production specifies what can replace the RHS.

2.2.3 Alternatives

Two productions may have exactly the same LHS. In this case, it means that this particular LHS has alternatives.