Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## multivalent.std
Class VScript

    java.lang.Object
      multivalent.std.VScript

public class VScript
extends java.lang.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

- body = cmd; cmd; ...
- cmd = fn args
- fn = get | set | event
- args = literal | $variable
- literal = String
- variable = [namespace.]field
- namespace = pref | doc

Namespaces

- no namespace => local attrs (passed in call)
- pref => preferences
- doc => current document attrs

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

- set (literal | variable) => return value of (literal | variable)
- $(variable) => shorthand for above
- set (literal | variable) (literal | variable) => eval first pair to get name, set to value of eval of second pair
- event => trigger semantic event

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

Field Summary
`static java.lang.String[]` | `commands`

Method Summary
`static java.lang.String` | `eval(java.lang.Object expr, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals, Node node)` Evaluate an expression, returning result in a String.
`static boolean` | `getBoolean(java.lang.String name, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals, java.lang.String seed)`
`static java.lang.String` | `getVal(java.lang.String name, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals)`
`static java.lang.String` | `getVal(java.lang.String name, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals, java.lang.String seed)`
`static java.lang.String` | `getVar(java.lang.String name, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals)`
`static java.lang.String` | `putVal(java.lang.String name, java.lang.String val, Document doc, java.util.Map<java.lang.String,java.lang.Object> locals)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### commands

    public static final java.lang.String[] commands

Method Detail

### getVal

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

### getBoolean

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

### getVal

    public static java.lang.String getVal(java.lang.String name,
                                          Document doc,
                                          java.util.Map<java.lang.String,java.lang.Object> locals)

### getVar

    public static java.lang.String getVar(java.lang.String name,
                                          Document doc,
                                          java.util.Map<java.lang.String,java.lang.Object> locals)

### putVal

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

### eval

    public static java.lang.String eval(java.lang.Object expr,
                                        Document doc,
                                        java.util.Map<java.lang.String,java.lang.Object> locals,
                                        Node node)

  Evaluate an expression, returning result in a String.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD