Class ExpiryDateGrammar

java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<T>
com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
com.walkfares.calendar.expiry.ExpiryDateGrammar
All Implemented Interfaces:
com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>, org.antlr.v4.runtime.tree.ParseTreeVisitor<UTCDate>

public class ExpiryDateGrammar
extends com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
  • Constructor Summary

    Constructors 
    Constructor Description
    ExpiryDateGrammar​(Calendar tradingCalendar, UTCDate start)  
  • Method Summary

    Modifier and Type Method Description
    static UTCDate getDelivery​(CurveDate curveDate, PeriodCode pc, String code)  
    static UTCDate getExpiry​(Calendar tradingCalendar, UTCDate start, String code)  
    UTCDate visitAlign​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.AlignContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.align().
    UTCDate visitException​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.ExceptionContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.exception().
    UTCDate visitLastday​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.LastdayContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.lastday().
    UTCDate visitMoveperiod​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.MoveperiodContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.moveperiod().
    UTCDate visitMoverel​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.MoverelContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.moverel().
    UTCDate visitPenultimate​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.PenultimateContext ctx)
    Visit a parse tree produced by ExpiryRuleParser.penultimate().

    Methods inherited from class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor

    visitDate, visitDelivery, visitEomday, visitExpiry, visitHolidayproximity, visitMove, visitMoveabs, visitNonbusinessdayproximity, visitPeriodcode, visitSomday, visitStart, visitTimelimit

    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

    • getExpiry

      public static UTCDate getExpiry​(Calendar tradingCalendar, UTCDate start, String code)
    • getDelivery

      public static UTCDate getDelivery​(CurveDate curveDate, PeriodCode pc, String code)
    • visitMoverel

      public UTCDate visitMoverel​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.MoverelContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.moverel().

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

      Specified by:
      visitMoverel in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitMoverel in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • visitMoveperiod

      public UTCDate visitMoveperiod​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.MoveperiodContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.moveperiod().

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

      Specified by:
      visitMoveperiod in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitMoveperiod in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • visitLastday

      public UTCDate visitLastday​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.LastdayContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.lastday().

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

      Specified by:
      visitLastday in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitLastday in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • visitPenultimate

      public UTCDate visitPenultimate​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.PenultimateContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.penultimate().

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

      Specified by:
      visitPenultimate in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitPenultimate in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • visitAlign

      public UTCDate visitAlign​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.AlignContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.align().

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

      Specified by:
      visitAlign in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitAlign in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result
    • visitException

      public UTCDate visitException​(com.walkfares.calendar.expiry.grammar.ExpiryRuleParser.ExceptionContext ctx)
      Description copied from class: com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor
      Visit a parse tree produced by ExpiryRuleParser.exception().

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

      Specified by:
      visitException in interface com.walkfares.calendar.expiry.grammar.ExpiryRuleVisitor<UTCDate>
      Overrides:
      visitException in class com.walkfares.calendar.expiry.grammar.ExpiryRuleBaseVisitor<UTCDate>
      Parameters:
      ctx - the parse tree
      Returns:
      the visitor result