Class MultipleEquationParser

java.lang.Object
com.singularsys.jep.misc.parallelparsing.MultipleEquationParser

public class MultipleEquationParser extends Object
A parser which can be used to parse multiple expressions in sequence. Separate instances can be used in multiple threads to allow parallel parsing of multiple sets of expressions.

The class is initialized by the constructor MultipleEquationParser(ConfigurableParser, Reader) constructor with a Reader containing the input stream. The continueParsing() method to return the result of parsing the next expression in the stream.

  • Constructor Details

    • MultipleEquationParser

      public MultipleEquationParser(ConfigurableParser threadSafeConfigurbleParser, Reader input)
      Creates a new parser for the given stream.
      Parameters:
      threadSafeConfigurbleParser -
      input - the input
  • Method Details

    • continueParsing

      public Node continueParsing() throws ParseException
      Pases the next expression in the stream. Empty equations such as "x=1;;y=2" are silently ignored, in this case the second call will return the node representing y=2.
      Returns:
      top node of equation parsed to date or null at EOF.
      Throws:
      ParseException - if there is a syntax error in expression
      See Also: