Most of the phrase structure of Pascal can be deduced from the abstract syntax given in Section 1.1. In a number of cases, however, the abstract syntax is either ambiguous or designed to capture the semantics of a construct more cleanly than the phrase structure allows. Concrete syntax rules are introduced to define the phrase structure in those situations.
Eli uses pattern matching to determine the relationship between phrases defined by a concrete syntax and AST nodes defined by an abstract syntax. It recognizes simple identities like that of rule pgrm in Figure 1, and LISTOF rules are properly associated with concrete syntax rules that use extended BNF notation to describe iteration.
The concrete syntax for Pascal uses a number of symbols that do not appear in the abstract grammar. For example, the operator precedence rules of the language are described by using distinct symbols for expressions at each precedence level. Symbol mappings convert all of these distinct expression symbols into the single symbol expression used in the abstract grammar.
Several shorthand notations, such as multi-dimensional arrays, are incorporated into the concrete syntax. These shorthands are converted into their long form in the abstract syntax by rule mappings.
Eli cannot deduce these mappings from the grammars themselves; an additional specification is needed: