The grammar of a language is specified in the syntax declaration. Its syntax is listed as follows:
Syntax_Decl ::= syntax Id { [ Precedence_Decl ¼ Precedence_Decl ] [ Expect_Decl ] [ Production_Rule ¼ Production_Rule ] }
The name of a syntax declaration should match that of a syntax class. A syntax declaration is divided into three parts: (i) the operator precedence section, (ii) the expect: n section, and (iii) the grammar section.