Concrete to Abstract Syntax Mapping


The mapping from concrete to abstract syntax is described as part of the grammar. It is described by adding a synthesized  attribute ast to each production which has the corresponding metaclass from the abstract syntax as its type. This allows the mapping to be fully formalized within the attribute grammar formalism.

Abstract Syntax to Concrete Syntax Mapping

IIt is often useful to have a defined mapping from the abstract syntax to the concrete syntax. This mapping can be defined by applying the production rules in Section 9.3 ("Concrete Syntax") from left to right. As a general guideline nothing will be implicit (like e.g implicit collect, implicit use of object as set, etc.), and all iterator variables will be filled in completely. The mapping is not formally defined in this document but should be obvious.