Lgi Scripting Language

Lgi's scripting language is loosely based on the "C" syntax, but without a number of the more difficult to implement parts of the language. Support for the language is broken into 2 parts; the compiler, which converts source code into binary byte code, and the virtual machine, which executes the byte code in the context of the application.

None of the parts of the compiler / VM system are particularly fast or modern, and if I my choices again I would try harder to intergrate Python than write some weird little language. The compiler is recursive, and the VM is based around a big switch statement. Both quite old concepts.

That said it does work ok, and it acheives some flexibility in the various host applications. It's also very small, added very little overhead to the host and also comes with direct support for using native Lgi types, including support for DOM tree's using the '.' operator.

There is a default library of methods that are normally included with the VM in the host application which provide some support for string manipulation and other utilities.

The main applications that host Lgi's scripting language are i.Mage (for drawing procedural images) and Scribe (for filters, custom menu commands and utils/tools).