Class ExpressionParser
java.lang.Object
com.github.zafarkhaja.semver.expr.ExpressionParser
- All Implemented Interfaces:
Parser<Expression>
A parser for the SemVer Expressions.
- Since:
- 0.7.0
- Author:
- Zafar Khaja <zafarkhaja@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionstatic Parser<Expression>
Creates and returns new instance of theExpressionParser
class.Parses the SemVer Expressions.
-
Method Details
-
newInstance
Creates and returns new instance of theExpressionParser
class. This method implements the Static Factory Method pattern.- Returns:
- a new instance of the
ExpressionParser
class
-
parse
Parses the SemVer Expressions.- Specified by:
parse
in interfaceParser<Expression>
- Parameters:
input
- a string representing the SemVer Expression- Returns:
- the AST for the SemVer Expressions
- Throws:
LexerException
- when encounters an illegal characterUnexpectedTokenException
- when consumes a token of an unexpected type
-