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 by DateRuleParser.absolute().
    UTCDate visitDaterule​(com.walkfares.calendar.daterule.grammar.DateRuleParser.DateruleContext ctx)
    Visit a parse tree produced by DateRuleParser.daterule().
    UTCDate visitRelative​(com.walkfares.calendar.daterule.grammar.DateRuleParser.RelativeContext ctx)
    Visit a parse tree produced by DateRuleParser.relative().

    Methods inherited from class com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor

    visitStart

    Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor

    visit, visitChildren, visitErrorNode, visitTerminal

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor

    visit, visitChildren, visitErrorNode, visitTerminal
  • Constructor Details

  • Method Details

    • parse

      public UTCDate parse​(String text)
    • parse

      public UTCDate parse​(String text, boolean align)
    • setReferenceDate

      public DateRuleGrammar setReferenceDate​(UTCDate referenceDate)
    • setCalendar

      public DateRuleGrammar setCalendar​(Calendar calendar)
    • 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 by DateRuleParser.daterule().

      The default implementation returns the result of calling AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode) on ctx.

      Specified by:
      visitDaterule in interface com.walkfares.calendar.daterule.grammar.DateRuleVisitor<UTCDate>
      Overrides:
      visitDaterule in class com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • 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 by DateRuleParser.relative().

      The default implementation returns the result of calling AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode) on ctx.

      Specified by:
      visitRelative in interface com.walkfares.calendar.daterule.grammar.DateRuleVisitor<UTCDate>
      Overrides:
      visitRelative in class com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • 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 by DateRuleParser.absolute().

      The default implementation returns the result of calling AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode) on ctx.

      Specified by:
      visitAbsolute in interface com.walkfares.calendar.daterule.grammar.DateRuleVisitor<UTCDate>
      Overrides:
      visitAbsolute in class com.walkfares.calendar.daterule.grammar.DateRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result