multivalent.std

Class VScript

public class VScript extends Object

Micro scripting language. Statement evaluator: mini scripting language that can tickle Preferences, Browser attributes, and local (node or behavior) attributes. Not fast, but fast enough; not powerful, but powerful enough. Rather than growing into a real language, it will be replaced if necessary, or alternatives will be available. Like Tcl, as far as it goes.

Syntax

Namespaces

Commands (return value of script is return value of last command)

Version: $Revision: 1.3 $ $Date: 2003/06/02 05:30:36 $

Field Summary
static String[]commands
Method Summary
static Stringeval(Object expr, Document doc, Map<String,Object> locals, Node node)
Evaluate an expression, returning result in a String.
static booleangetBoolean(String name, Document doc, Map<String,Object> locals, String seed)
static StringgetVal(String name, Document doc, Map<String,Object> locals, String seed)
static StringgetVal(String name, Document doc, Map<String,Object> locals)
static StringgetVar(String name, Document doc, Map<String,Object> locals)
static StringputVal(String name, String val, Document doc, Map<String,Object> locals)

Field Detail

commands

public static final String[] commands

Method Detail

eval

public static String eval(Object expr, Document doc, Map<String,Object> locals, Node node)
Evaluate an expression, returning result in a String.

getBoolean

public static boolean getBoolean(String name, Document doc, Map<String,Object> locals, String seed)

getVal

public static String getVal(String name, Document doc, Map<String,Object> locals, String seed)

getVal

public static String getVal(String name, Document doc, Map<String,Object> locals)

getVar

public static String getVar(String name, Document doc, Map<String,Object> locals)

putVal

public static String putVal(String name, String val, Document doc, Map<String,Object> locals)