Package com.singularsys.jep.parser
Class StandardParser
java.lang.Object
com.singularsys.jep.parser.StandardParser
- All Implemented Interfaces:
JepComponent,Parser,Serializable
Empty placeholder class
- Author:
- rich
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParse the next expressions from existing stream.Gets a light-weight instance suitable for using in multiple threads.voidInitialize the component.Parses the input from the readerstream.voidRestart the parser for reentrant parsing of multiple equations.
-
Constructor Details
-
StandardParser
public StandardParser()
-
-
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:
jep1- the current Jep instance
-
parse
Parses the input from the readerstream. The JavaCC parser is employed to complete this task. Errors are listed in errorList or trapped by catchingParseExceptions.- Specified by:
parsein interfaceParser- Parameters:
stream- input reader- Returns:
- the top node of the parse tree.
- Throws:
ParseException- on syntax/grammatical error in input
-
restart
Description copied from interface:ParserRestart the parser for reentrant parsing of multiple equations. -
continueParse
Parse the next expressions from existing stream. Empty expressions such as ;; are silently ignored.- Specified by:
continueParsein interfaceParser- Returns:
- top node of the expression or null at end of file
- Throws:
ParseException- on syntax/grammatical error in input- See Also:
-
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- null
-