public class Rapids
extends java.lang.Object
Rapids is an interpreter of abstract syntax trees.
This file contains the AstRoot parser and parser helper functions. AstRoot Execution starts in the AstExec file, but spreads throughout Rapids.
Trees have a Lisp-like structure with the following "reserved" special characters:
Variables are lexically scoped inside 'let' expressions or at the top-level looked-up in the DKV directly (and must refer to a known type that is valid on the execution stack).
Modifier and Type | Class and Description |
---|---|
static class |
Rapids.IllegalASTException |
Modifier and Type | Method and Description |
---|---|
static Val |
exec(java.lang.String rapids)
Execute a single rapids call in a short-lived session
|
static Val |
exec(java.lang.String rapids,
Session session)
Compute and return a value in this session.
|
static AstRoot |
parse(java.lang.String rapids)
Parse a Rapids expression string into an Abstract Syntax Tree object.
|
public static AstRoot parse(java.lang.String rapids)
rapids
- expression to parsepublic static Val exec(java.lang.String rapids)
rapids
- expression to parsepublic static Val exec(java.lang.String rapids, Session session)
rapids
- expression to parse