Slide 3.3: Ambiguity (cont.)
Slide 3.5: Abstract syntax trees
Home

Abstract Syntax


Every programming language has a concrete syntax. Furthermore, every implementation of a programming language uses an abstract syntax. The programming language Wren is a small imperative language whose only control structures are the if command for selection and the while command for iteration. An example program of Wren is given as follows:


The following list explains the two kinds of syntax of Wren: The abstract syntax is part of the definition of a particular implementation (evaluator or compiler) of a language. If the language allows us to access the implementation structures from within itself (such as Scheme, which allows us to treat programs as Scheme data structures; i.e. Scheme lists), then of course, the abstract syntax becomes part of the definition of that language.