Grammar, which knows how to control even kings . . .
|--Molière, Les Femmes Savantes (1672), Act II, scene vi|
This chapter describes the context-free grammars used in this specification to define the lexical and syntactic structure of a program.
A context-free grammar consists of a number of productions. Each production has an abstract symbol called a nonterminal as its left-hand side, and a sequence of one or more nonterminal and terminal symbols as its right-hand side. For each grammar, the terminal symbols are drawn from a specified alphabet.
Starting from a sentence consisting of a single distinguished nonterminal, called the goal symbol, a given context-free grammar specifies a language, namely, the ...