Package com.singularsys.jep.misc
Class NullParser
java.lang.Object
com.singularsys.jep.misc.NullParser
- All Implemented Interfaces:
JepComponent,Parser,Serializable
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead the next equation from the stream.Gets a light-weight instance suitable for using in multiple threads.voidInitialize the component.Parse a single equation from a streamvoidRestart the parser for reentrant parsing of multiple equations.
-
Field Details
-
NULL_PARSER
Singleton instance.
-
-
Constructor Details
-
NullParser
public NullParser()
-
-
Method Details
-
init
Description copied from interface:JepComponentInitialize 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:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
continueParse
Description copied from interface:ParserRead the next equation from the stream. By default, empty expressions should be silently ignored.- Specified by:
continueParsein interfaceParser- Returns:
- the root node of the expression tree
- Throws:
ParseException- always
-
parse
Description copied from interface:ParserParse a single equation from a stream- Specified by:
parsein interfaceParser- Parameters:
stream- input reader- Returns:
- the root node of the expression tree
- Throws:
ParseException- always
-
restart
Description copied from interface:ParserRestart the parser for reentrant parsing of multiple equations. -
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- either a new instance, null or 'this'.
-