lispmax
is a module for BlitzMax that can parse and execute a lispy scripting language.
The following lisp expression adds two numbers together:
(+ 10 20)
To run this within BlitzMax using lispmax, we need to do the following:
In practice, it looks a little like this:
Framework brl.basic
Import sodaware.lispmax
' Create a new LispMax instance.
Local lisp:LispMax = New LispMax
' Load built-in and library functions.
lisp.initializeEnvironment()
' Parse and evaluate the expression.
Local expression:LispMax_Atom = lisp.parseExpression("(+ 10 20)")
Local result:LispMax_Atom = lisp.evaluateExpression(expression)
' Print the result.
lisp.printExpression(result)
Running the above example will print 30
.
-> Read more on the lispmax.mod project homepage.