Tutorial on implementing a scripting language on top of Java

; Date: Fri Apr 28 2006

Tags: OpenJDK

(web.archive.org) Build your own scripting language for Java covers a topic I had wanted to research and write. Fortunately someone else took up the cause.

At issue is the question of using the JSR 223 features, in Mustang as the javax.script package, to implement a scripting language on top of Java.

I've written about this earlier, but I see this as potentially a very good strategic move. Any language author of a scripting language has a choice of "how do I implement the interpreter?". Typically a language author has to both design their language as well as the underlying interpreter engine. But, I think the required skills are very different. To be a good language designer, and to be a good interpreter implementer, are very different tasks.

With JSR 223 a language designer can now concentrate on the language design. They can rely on the Java VM to provide the execution engine.

Plus, their user community doesn't have to reinvent the whole world ... instead they can reuse the vast library of available Java classes.

In the Java World article I've linked to, the author takes you through the design of a simplistic language and the implementation of two ways to execute that language within Java.

Source: (web.archive.org) weblogs.java.net

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.