Adding Features


You’ll notice that the following chapters will all follow a similar pattern. This pattern is the typical approach used to add new features to a language. It consists of a number of steps that bring a feature from start to finish. These are listed below, and are exactly what we’re going to do in this chapter to introduce a new feature called a Q-Expression.

SyntaxAdd new rule to the language grammar for this feature.
RepresentationAdd new data type variation to represent this feature.
ParsingAdd new functions for reading this feature from the abstract syntax tree.
SemanticsAdd new functions for evaluating and manipulating this feature.