Jasmine  1.1
Super fast expression and algorithm evaluator
 All Classes Functions
org.quark.jasmine.AbstractExpression Class Reference
Inheritance diagram for org.quark.jasmine.AbstractExpression:

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"
 

Detailed Description

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)

Author
Peter Lager

Constructor & Destructor Documentation

org.quark.jasmine.AbstractExpression.AbstractExpression ( )

Default constructor to initialize fields.

Member Function Documentation

Answer org.quark.jasmine.AbstractExpression.answer ( )

Use this with Expression(s) to get the answer.

Returns
the result of evaluating the expression
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

Returns
build time in nanoseconds
long org.quark.jasmine.AbstractExpression.getEvalTime ( )

Get the length of time it took to evaluate the expression/algorithm

Returns
evaluation time in nanoseconds
String org.quark.jasmine.AbstractExpression.infix ( )

The infix code produced when parsing the expression or algorithm

String org.quark.jasmine.AbstractExpression.makeAST ( Exp  ast)
protected

Produces the AST description

String org.quark.jasmine.AbstractExpression.makeByteCode ( byte[]  b)
protected

Produces the Java byte code description

String org.quark.jasmine.AbstractExpression.makeInfix ( List< Exp infix)
protected

Produces the infix description

void org.quark.jasmine.AbstractExpression.mmakeASTimpl ( Exp  exp,
String  tab,
StringBuilder  sb 
)
protected

Recursive function to help make the AST description


The documentation for this class was generated from the following file: