Class MultipleEquationParsingJep
java.lang.Object
com.singularsys.jep.Jep
com.singularsys.jep.misc.parallelparsing.MultipleEquationParsingJep
- All Implemented Interfaces:
Serializable
A Jep which uses a
ParallelConfigurableParser
providing implementations of the
Jep.initMultiParse(java.io.Reader) and continueParsing() methods.
Note those methods are only intended to
run in a single thread, and this class is
only intended to provide compatibility.
To allow multiple threads to each parse
sequences of expressions. The
ParallelConfigurableParser.newMultipleEquationParser(java.io.Reader) method
should be used to create a new MultipleEquationParser,
once per thread. Its MultipleEquationParser.continueParsing()
method can be called multiple times to parse the sequence of expressions
specified in the Reader.
- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.Jep
additionalComponents, allowAssignment, allowUndeclared, evaluator, funTab, implicitMul, lastRootNode, nodeFac, numFac, opTab, parser, pv, varFac, varTab -
Constructor Summary
ConstructorsConstructorDescriptionMultipleEquationParsingJep(ParallelConfigurableParser tscp, JepComponent... components) Creates a newMultipleEquationParsingJepusing the givenParallelConfigurableParserand components. -
Method Summary
Modifier and TypeMethodDescriptionCalls theMultipleEquationParser.continueParsing()method.voidinitMultiParse(String str) Creates a newMultipleEquationParserfor the given string.Methods inherited from class com.singularsys.jep.Jep
addConstant, addDefaultComponents, addFunction, addStandardConstants, addVariable, addVariable, addVariable, addVariable, evaluate, evaluate, evaluateD, getAdditionalComponent, getAdditionalComponentExact, getAdditionalComponents, getAllowAssignment, getAllowUndeclared, getDefaultValue, getEvaluator, getFunctionTable, getImplicitMul, getLastRootNode, getNodeFactory, getNumberFactory, getOperatorTable, getOperatorTable2, getParser, getPrintVisitor, getVariable, getVariableFactory, getVariableTable, getVariableValue, initMultiParse, parse, parse, print, print, print, println, println, println, reinitializeComponents, rootNodeToString, setAllowAssignment, setAllowUndeclared, setComponent, setComponentInternal, setComponents, setComponentsInternal, setDefaultValue, setImplicitMul, setVariable, setVariableValue, toString, tryAddConstant
-
Constructor Details
-
MultipleEquationParsingJep
Creates a newMultipleEquationParsingJepusing the givenParallelConfigurableParserand components.- Parameters:
tscp- theParallelConfigurableParsercomponents- other components
-
-
Method Details
-
initMultiParse
Creates a newMultipleEquationParserfor the given string. Storing it in a field for later use by thecontinueParsing()method.- Overrides:
initMultiParsein classJep- Parameters:
str- String containing a sequence of expressions separated by semicolons.- See Also:
-
continueParsing
Calls theMultipleEquationParser.continueParsing()method.- Overrides:
continueParsingin classJep- Returns:
- top node of equation parsed to date or null at EOF.
- Throws:
ParseException- if there is a syntax error in expression- See Also:
-