The remainder of this chapter covers how to implement an imperative language, focusing on Sling for its examples. The internal representation of an imperative language script is a command. The following two sections cover
Imperative languages often allow the user to create new functions, such as cartesian(x, sin(4*x)). A pair of sections cover
Building runtime functions
After showing you how to capture Sling commands and functions, this chapter wraps up with a discussion of the Sling target class and covers the remaining tasks for building a Sling parser:
Write a grammar.
Write assemblers to build Sling commands.
Generate a Sling parser from the grammar, plugging ...