www.want-tool.org
WANTScript Posted to the Sandbox
   

By Andrew J. Wozniewicz
Milwaukee, July 21, 2008

I finally found some time to work on WANT again and here is the initial result. I just posted WANTScript.zip containing WANT.exe and a handful of WANTScript test samples (*.want) to the Sandbox.

The sample files should give one a reasonable understanding of what WANTScript (the language) is all about. I'll just say that it is a much simplified incarnation of my toy-project, Modula-7.

Unlike Modula-7, WANTScript is - for now - a procedural, interpreted language specifically for scripting. The simplification made it possible for me to create an initial working implementation now, rather than in an unspecified future when I would ideally iron out all the kinks from Modula-7. WANTScript will continue to borrow heavily from Modula-7, but it will always be its poor, interpreted and simpler cousin.

You should expect most typical procedural programming features to work at this stage. The language is comparable to VBScript and JavaScript in its expressive power, although it is still missing some of the more involved capabilities (lists in particular, to name one). But the typical constructs like loops, if-then conditionals, arithmetic expressions, subroutines (procedures and functions), and the like, should all definitely work now, as attested to by the sample scripts. There are a few surprises there, for a curious observer - features not typically found in other programming languages - so be sure to check them out.

The interpreter incorporates a couple of built-in modules that are available to be imported into your programs. The included modules are: System, System.IO.Console, System.Reflection, and System.Utilities. I will post some documentation on what's available in each of these shortly, but for now, you can refer to the Pascal source files of each of these modules, also posted in the sandbox, or to the WANTScript sample files, which utilize all the currently available functionality.

The idea going forward is that the functionality specific to WANT will be implemented in a built-in module/namespace called WANT. The currently available built-in modules serve as examples of how to extend the basic interpreter with user-defined additions. That's how WANT-specific features are going to be implemented in the end.

The documentation of the language is currently non-existent beyond the sample scripts. I will, consequently, be monitoring closely the WANT forum to answer any initial questions anyone might have.

I would greatly appreciate any feedback regarding the language. It is still evolving and - most importantly - I am still continuing to test its features. It would be great if people could come up with sample scripts that attempt to "break" the interpreter.

-Andrew