O'Reilly logo

Building Parsers with Java™ by Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Parsing an Imperative Language

This chapter shows how to create imperative languages, which are also called programming or scripting languages. An imperative language lets a user create a collection of commands (the program or script) that, within some context, direct the computer's actions. A parser for an imperative language translates a user's program into an executable composition of commands.

To provide a running example of how to construct an imperative language, this chapter uses Sling, a programming language created for this book. Sling allows a user to compose mathematical functions and to request plots of these functions. A Sling environment accepts Sling programs and displays a user's plots.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required