|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.omegahat.Environment.Interpreter.BasicEvaluator
|
+--org.omegahat.Environment.Interpreter.UtilityEvaluator
|
+--org.omegahat.Environment.Interpreter.UserClassEvaluator
|
+--org.omegahat.Environment.Interpreter.InteractiveEvaluator
|
+--org.omegahat.Environment.Interpreter.TracingEvaluator
This evaluator offers the built-in ability to display a trace of the evaluation of the different top-level tasks in terms of the steps through the expression tree. As each new task is evaluated, the contents of the viewer are updated to reflect this and the sub-expressions highlighted as they are evaluated. This is a simple example of a debugger using the listener mechanism.
| Field Summary | |
protected ExpressionTreeWindow |
parserViewer
The viewer for the expression tree that is used to display which sub-expressions have been evaluated and which is currently active. |
| Fields inherited from class org.omegahat.Environment.Interpreter.InteractiveEvaluator |
continuation, continuationPrompt, interrupt, notify_listeners, pendingInput, promptExpression |
| Fields inherited from class org.omegahat.Environment.Interpreter.UserClassEvaluator |
classManager |
| Fields inherited from class org.omegahat.Environment.Interpreter.BasicEvaluator |
allowUnrestrictedAccess, class_lists, currentExpression, data, databases, debugger, DefaultAttachIndex, defaultDatabase, dynamicClassLoader, errorHandler, evaluationEvent, evaluationListeners, initialized, internalFunctionTables, internalPrimitiveClassNames, internalPrimitiveClassTable, lexer, localClasses, manager, options, output, parser, primitive_classes, primitiveClasses, PrimitiveClassNames, primitiveTypeNames, primitiveTypes, reversePrimitiveTypes, ShowMultipleClasses, sourceStack, stderr, stdout, SubEvaluationListeners, taskHistory, toplevelExpression, warningMessages |
| Fields inherited from interface org.omegahat.Environment.Interpreter.Evaluator |
ThisVariableName |
| Constructor Summary | |
TracingEvaluator()
|
|
TracingEvaluator(Evaluator evaluator)
|
|
TracingEvaluator(EvaluatorManager manager)
|
|
| Method Summary | |
java.lang.Object |
evaluate(ExpressionInt expression)
Overrides the basic evaluate() method to insert a call to update
the viewer's display to reflect the new top-level task expression tree. |
boolean |
make()
Initialize this evaluator, constructing and displaying the ExpressionTreeWindow
to use to display the expression tree. |
ExpressionTreeWindow |
parserViewer()
Return the current viewer being used to display the parse tree and its activity. |
ExpressionTreeWindow |
parserViewer(ExpressionTreeWindow viewer)
Register a new viewer to use as the display component for the expression tree and activity. |
| Methods inherited from class org.omegahat.Environment.Interpreter.InteractiveEvaluator |
currentExpression, deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, evaluate, inputReady, inputReady, interrupt, notify_listeners, notify_listeners, notifyListeners, parserError, prompt, promptExpression, promptExpression, promptExpression, serialize, serialize, serialize, serialize |
| Methods inherited from class org.omegahat.Environment.Interpreter.UserClassEvaluator |
addMethod, classManager, classManager, createInstance, createInstance, createInstance, defineClass, defineClass, defineClass, defineClass, defineClass, defineClass, DefineUserClass, DefineUserClass, DefineUserClass, findUserClass, findUserClass, parseClass, parser |
| Methods inherited from class org.omegahat.Environment.Interpreter.UtilityEvaluator |
evaluator, exec, exec, findFile, getEvaluator, setProperty, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ExpressionTreeWindow parserViewer
| Constructor Detail |
public TracingEvaluator()
public TracingEvaluator(Evaluator evaluator)
public TracingEvaluator(EvaluatorManager manager)
| Method Detail |
public java.lang.Object evaluate(ExpressionInt expression)
throws java.lang.Throwable
evaluate() method to insert a call to update
the viewer's display to reflect the new top-level task expression tree.
This arranges to call the make() method the first time it is called.evaluate in class BasicEvaluatorpublic boolean make()
ExpressionTreeWindow
to use to display the expression tree.public ExpressionTreeWindow parserViewer()
public ExpressionTreeWindow parserViewer(ExpressionTreeWindow viewer)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||