Class MathMLConsole
java.lang.Object
com.singularsys.jepexamples.consoles.Console
com.singularsys.jepexamples.consoles.CPConsole
com.singularsys.extexamples.consoles.MathMLConsole
Simple console application where jep equations are input on the command line and the resulting xml is printed.
- Author:
- Richard Morris
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jepexamples.consoles.Console
Console.JepOutputStream, Console.JepPrintStream, Console.NodeRes, Console.SPEC_ACTION -
Field Summary
FieldsFields inherited from class com.singularsys.jepexamples.consoles.Console
altered, doubleFormat, history, jep, showHistory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsets up all the needed objects.static voidvoidPrints introductory text.processEquation(Node node) Performs the required operation on a node.voidSets the evaluator used.voidsetMonitor(String[] args) Sets up monitoring of the call tree.Methods inherited from class com.singularsys.jepexamples.consoles.Console
clearVars, finaliseCommand, getCommand, getHistory, getJep, getPrompt, handleError, inputLoop, parseEvaluate, print, printFunctionEntry, printFuns, printHistory, println, printOps, printStdHelp, printVars, processCommand, run, setAlteredCommand, setFormat, setFormat, setIndexShift, showCalls, showTree, split, testSpecialCommands, toString
-
Field Details
-
LOCAL_STYLESHEETS_DIR
- See Also:
-
-
Constructor Details
-
MathMLConsole
public MathMLConsole()
-
-
Method Details
-
main
-
initialise
public void initialise()Description copied from class:Consolesets up all the needed objects.- Overrides:
initialisein classCPConsole
-
processEquation
Description copied from class:ConsolePerforms the required operation on a node. Typically, evaluates the node and prints the value.- Overrides:
processEquationin classConsole- Parameters:
node- Node representing expression- Returns:
- The result of the calculation
- Throws:
JepException- if a Parse or evaluation error
-
printIntroText
public void printIntroText()Description copied from class:ConsolePrints introductory text.- Overrides:
printIntroTextin classConsole
-
setMonitor
Description copied from class:ConsoleSets up monitoring of the call tree. CallsConsole.setEvaluator(Evaluator)with aMonitoringEvaluator, sub-classes may need to override this method disable this feature.- Overrides:
setMonitorin classConsole- Parameters:
args- second argument can be one of "off", "calls" or "times"
-
setEvaluator
Description copied from class:ConsoleSets the evaluator used. Default method simple callsJep.setComponent(com.singularsys.jep.JepComponent)with the evaluator.- Overrides:
setEvaluatorin classConsole- Parameters:
ev- the evaluator to use
-