Package com.singularsys.jep.parser

# Class StandardParser

java.lang.Object
com.singularsys.jep.parser.StandardParser

All Implemented Interfaces:
  `JepComponent`, `Parser`, `Serializable`

public class StandardParser extends Object implements Parser
The standard parser for Jep. This class uses a JavaCC generated parser.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StandardParser()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Node`
  `continueParse()`
  Parse the next expressions from existing stream.
  `JepComponent`
  `getLightWeightInstance()`
  Gets a light-weight instance suitable for using in multiple threads.
  `void`
  `init(Jep jep1)`
  Initialize the component.
  `Node`
  `parse(Reader stream)`
  Parses the input from the reader `stream`.
  `void`
  `restart(Reader stream)`
  Restart the parser for reentrant parsing of multiple equations.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StandardParser

    public StandardParser()

- ## Method Details

  - ### init

    public void init(Jep jep1)
    Description copied from interface: `JepComponent`
    Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
    Specified by:
      `init` in interface `JepComponent`
    Parameters:
      `jep1` - the current Jep instance

  - ### parse

    public Node parse(Reader stream) throws ParseException
    Parses the input from the reader `stream`. The JavaCC parser is employed to complete this task. Errors are listed in errorList or trapped by catching `ParseException`s.
    Specified by:
      `parse` in interface `Parser`
    Parameters:
      `stream` - input reader
    Returns:
      the top node of the parse tree.
    Throws:
      `ParseException` - on syntax/grammatical error in input

  - ### restart

    public void restart(Reader stream)
    Description copied from interface: `Parser`
    Restart the parser for reentrant parsing of multiple equations.
    Specified by:
      `restart` in interface `Parser`
    Parameters:
      `stream` - input stream

  - ### continueParse

    public Node continueParse() throws ParseException
    Parse the next expressions from existing stream. Empty expressions such as ;; are silently ignored.
    Specified by:
      `continueParse` in interface `Parser`
    Returns:
      top node of the expression or null at end of file
    Throws:
      `ParseException` - on syntax/grammatical error in input
    See Also:
      - `restart(java.io.Reader)`

  - ### getLightWeightInstance

    public JepComponent getLightWeightInstance()
    Description copied from interface: `JepComponent`
    Gets a light-weight instance suitable for using in multiple threads.
    Specified by:
      `getLightWeightInstance` in interface `JepComponent`
    Returns:
      null