Jasmine
1.1
Super fast expression and algorithm evaluator
|
Public Member Functions | |
AbstractExpression () | |
Answer | answer () |
long | getBuildTime () |
long | getEvalTime () |
String | infix () |
String | ast () |
String | bytecode () |
Protected Member Functions | |
String | makeInfix (List< Exp > infix) |
String | makeAST (Exp ast) |
String | makeAST (Deque< Exp > ast) |
void | mmakeASTimpl (Exp exp, String tab, StringBuilder sb) |
String | makeByteCode (byte[] b) |
Protected Attributes | |
long | __buildTime |
long | __evalTime |
Answer | __answer |
String | infix |
String | ast |
String | bytecode |
Static Private Attributes | |
static String | divider = "======================================================================\n" |
Base class for both Expression(s) and Algorithm(s).
Holds basic information about the time to build the expression/algorithm class and the time to perform the evaluation.
Methods to get the intermediate stages of compilation give an insight into how this works under the hood. (added in 1.0.2)
org.quark.jasmine.AbstractExpression.AbstractExpression | ( | ) |
Default constructor to initialize fields.
Answer org.quark.jasmine.AbstractExpression.answer | ( | ) |
Use this with Expression(s) to get the answer.
String org.quark.jasmine.AbstractExpression.ast | ( | ) |
The abstract syntax tree (AST) produced for the expression or algorithm
String org.quark.jasmine.AbstractExpression.bytecode | ( | ) |
The bytecode that will be executed in the eval(...) method
long org.quark.jasmine.AbstractExpression.getBuildTime | ( | ) |
Get the length of time it took to build the expression/algorithm
long org.quark.jasmine.AbstractExpression.getEvalTime | ( | ) |
Get the length of time it took to evaluate the expression/algorithm
String org.quark.jasmine.AbstractExpression.infix | ( | ) |
The infix code produced when parsing the expression or algorithm
|
protected |
Produces the AST description
|
protected |
Produces the Java byte code description
|
protected |
Produces the infix description
|
protected |
Recursive function to help make the AST description