- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, Freezable
public class Exec
extends Iced
Exec is an interpreter of abstract syntax trees.
Trees have a Lisp-like structure with the following "reserved" special characters:
'(' signals the parser to parse a function name, the next token is an identifier or a (single char) flag
'#' signals the parser to parse a double: attached_token
'"' signals the parser to parse a String (double quote): attached_token
"'" signals the parser to parse a String (single quote): attached_token
'%' signals a variable lookup: attached_token
'!' signals a variable set: attached_token
'[' signals a column slice by index - R handles all named to int conversions (as well as 1-based to 0-based)
'def' signals the parser to a parse a function: (def name args body).
'=' signals the parser to assign the RHS to the LHS.
'g' signals >
'G' signals >=
'l' signals <
'L' signals <=
'n' signals ==
'N' signals !=
'not' signals negation (!)
'{' signals the parser to begin parsing a ';'-separated array of flagged inputs (#, %, ", ') (ASTSeries is the resulting AST)
In the above, attached_token signals that the special char has extra chars that must be parsed separately. These are
variable names (in the case of % and !), doubles (in the case of #), or Strings (in the case of ' and ").
Everything else is a function call (prefix/infix/func) and has a leading char of '('.
- See Also:
- Serialized Form