Package com.walkfares.calendar.daterule
Class DateRuleGrammar
java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<T>
com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor<UTCDate>
com.walkfares.calendar.daterule.DateRuleGrammar
- All Implemented Interfaces:
com.walkfares.calendar.daterule.grammar.DateRuleVisitor<UTCDate>
,org.antlr.v4.runtime.tree.ParseTreeVisitor<UTCDate>
public class DateRuleGrammar extends com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor<UTCDate>
-
Constructor Summary
Constructors Constructor Description DateRuleGrammar()
-
Method Summary
Modifier and Type Method Description UTCDate
parse(String text)
UTCDate
parse(String text, boolean align)
DateRuleGrammar
setCalendar(Calendar calendar)
DateRuleGrammar
setReferenceDate(UTCDate referenceDate)
UTCDate
visitAbsolute(com.walkfares.calendar.daterule.grammar.DateRuleParser.AbsoluteContext ctx)
Visit a parse tree produced byDateRuleParser.absolute()
.UTCDate
visitDaterule(com.walkfares.calendar.daterule.grammar.DateRuleParser.DateruleContext ctx)
Visit a parse tree produced byDateRuleParser.daterule()
.UTCDate
visitRelative(com.walkfares.calendar.daterule.grammar.DateRuleParser.RelativeContext ctx)
Visit a parse tree produced byDateRuleParser.relative()
.Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
DateRuleGrammar
public DateRuleGrammar()
-
-
Method Details
-
parse
-
parse
-
setReferenceDate
-
setCalendar
-
visitDaterule
public UTCDate visitDaterule(com.walkfares.calendar.daterule.grammar.DateRuleParser.DateruleContext ctx)Description copied from class:com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor
Visit a parse tree produced byDateRuleParser.daterule()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
. -
visitRelative
public UTCDate visitRelative(com.walkfares.calendar.daterule.grammar.DateRuleParser.RelativeContext ctx)Description copied from class:com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor
Visit a parse tree produced byDateRuleParser.relative()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
. -
visitAbsolute
public UTCDate visitAbsolute(com.walkfares.calendar.daterule.grammar.DateRuleParser.AbsoluteContext ctx)Description copied from class:com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor
Visit a parse tree produced byDateRuleParser.absolute()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.
-