com.singularsys.jep.misc

## Class NullParser

- java.lang.Object
- - com.singularsys.jep.misc.NullParser

- All Implemented Interfaces:
    JepComponent, Parser, java.io.Serializable

      public class NullParser
      extends java.lang.Object
      implements Parser

  A Parser which cannot actually parse expressions. Used in situations where a small footprint Jep instance is needed which does not require parsing facilities.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static NullParser` | `NULL_PARSER` Singleton instance.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullParser()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Node` | `continueParse()` Read the next equation from the stream.
    `JepComponent` | `getLightWeightInstance()` Gets a light-weight instance suitable for using in multiple threads.
    `void` | `init(Jep jep)` Initialize the component.
    `Node` | `parse(java.io.Reader stream)` Parse a single equation from a stream
    `void` | `restart(java.io.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`

- - ### Field Detail

    - #### NULL_PARSER

          public static final NullParser NULL_PARSER

      Singleton instance.

  - ### Constructor Detail

    - #### NullParser

          public NullParser()

  - ### Method Detail

    - #### init

          public void init(Jep jep)

      Description copied from interface: `JepComponent`
      Initialize the component. This methods 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:
        `jep` - the current Jep instance

    - #### continueParse

          public Node continueParse()
                             throws ParseException

      Description copied from interface: `Parser`
      Read the next equation from the stream. By default empty expressions should be silently ignored.
      Specified by:
        `continueParse` in interface `Parser`
      Returns:
        the root node of the expression tree
      Throws:
        `ParseException` - always

    - #### parse

          public Node parse(java.io.Reader stream)
                     throws ParseException

      Description copied from interface: `Parser`
      Parse a single equation from a stream
      Specified by:
        `parse` in interface `Parser`
      Parameters:
        `stream` - input reader
      Returns:
        the root node of the expression tree
      Throws:
        `ParseException` - always

    - #### restart

          public void restart(java.io.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

    - #### 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:
        either an new instance, or 'this'.

Copyright © 2018 Singular Systems http://www.singularsys.com/jep