Class SourceExceptionParser
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.antlr.SourceExceptionParser
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
parse(org.antlr.v4.runtime.Lexer lexer, org.antlr.v4.runtime.Parser parser, Supplier<T> parseMethod, StatementSourceReference ref)
Use a Lexer/Parser pair extracting the parser's root item.static <T> T
parse(org.antlr.v4.runtime.Recognizer<?,?> recognizer, Supplier<T> parseMethod, StatementSourceReference ref)
Parse a Recognizer extracting its root item.
-
-
-
Method Detail
-
parse
public static <T> T parse(org.antlr.v4.runtime.Recognizer<?,?> recognizer, Supplier<T> parseMethod, StatementSourceReference ref)
Parse a Recognizer extracting its root item.- Parameters:
recognizer
- Recognizer to useparseMethod
- Root item extractor methodref
- Source reference- Returns:
- Parsed item
- Throws:
NullPointerException
- if any argument is nullSourceException
- if a parser error occurs
-
parse
public static <T> T parse(org.antlr.v4.runtime.Lexer lexer, org.antlr.v4.runtime.Parser parser, Supplier<T> parseMethod, StatementSourceReference ref)
Use a Lexer/Parser pair extracting the parser's root item.- Parameters:
lexer
- lexer to useparser
- parser to useparseMethod
- Root item extractor methodref
- Source reference- Returns:
- Parsed item
- Throws:
NullPointerException
- if any argument is nullSourceException
- if a parser error occurs
-
-