Package de.isas.lipidomics.palinom
Interface VisitorParser<T>
-
- Type Parameters:
T
- the type of the visitor parser
- All Known Implementing Classes:
GoslinFragmentsVisitorParser
,GoslinVisitorParser
,HmdbVisitorParser
,LipidMapsVisitorParser
,SumFormulaVisitorParser
,SwissLipidsVisitorParser
public interface VisitorParser<T>
Base interface for grammar-specific parser implementations based on the ANTLRv4 generated parsers.- Author:
- nils.hoffmann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
parse(String lipidString)
Calls parse withSyntaxErrorListener
.T
parse(String lipidString, SyntaxErrorListener listener)
default void
prepare(org.antlr.v4.runtime.Parser parser, org.antlr.v4.runtime.Lexer lexer, SyntaxErrorListener listener)
Sets up parser and lexer with custom error listener andGoslinErrorHandler
.
-
-
-
Method Detail
-
parse
T parse(String lipidString, SyntaxErrorListener listener) throws ParsingException
- Throws:
ParsingException
-
parse
default T parse(String lipidString) throws ParsingException
Calls parse withSyntaxErrorListener
.- Parameters:
lipidString
-- Returns:
- the target object of the visitor parser.
- Throws:
ParsingException
- when syntax are encountered.
-
prepare
default void prepare(org.antlr.v4.runtime.Parser parser, org.antlr.v4.runtime.Lexer lexer, SyntaxErrorListener listener)
Sets up parser and lexer with custom error listener andGoslinErrorHandler
.- Parameters:
parser
- the parser to configurelexer
- the lexer to configurelistener
- the syntax error listener
-
-