Class CrontabParser


  • public class CrontabParser
    extends org.antlr.v4.runtime.Parser
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.antlr.v4.runtime.atn.ATN _ATN  
      protected static org.antlr.v4.runtime.dfa.DFA[] _decisionToDFA  
      static String _serializedATN  
      protected static org.antlr.v4.runtime.atn.PredictionContextCache _sharedContextCache  
      static int ANNUALLY  
      static int AT  
      static int DAILY  
      static int DIV  
      static int H  
      protected Hash hash
      Used to pick a value from within the range
      static boolean HASH_TOKENS
      This property hashes tokens in the cron tab tokens like @daily so that they spread evenly.
      static int HOURLY  
      static int LPAREN  
      static int MIDNIGHT  
      static int MINUS  
      static int MONTHLY  
      static int NO_STEP
      Constant that indicates no step value.
      static int OR  
      static int RPAREN  
      static int RULE_expr  
      static int RULE_startRule  
      static int RULE_term  
      static int RULE_token  
      static String[] ruleNames  
      static int STAR  
      static int TOKEN  
      static String[] tokenNames
      Deprecated.
      Use VOCABULARY instead.
      static org.antlr.v4.runtime.Vocabulary VOCABULARY  
      static int WEEKLY  
      static int WS  
      static int YEARLY  
      • Fields inherited from class org.antlr.v4.runtime.Parser

        _buildParseTrees, _ctx, _errHandler, _input, _parseListeners, _precedenceStack, _syntaxErrors, matchedEOF
      • Fields inherited from class org.antlr.v4.runtime.Recognizer

        _interp, EOF
    • Constructor Summary

      Constructors 
      Constructor Description
      CrontabParser​(org.antlr.v4.runtime.TokenStream input)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected long doHash​(int step, int field)
      Uses Hash to choose a random (but stable) value from within this field.
      protected long doHash​(int s, int e, int step, int field)  
      protected long doRange​(int step, int field)  
      protected long doRange​(int start, int end, int step, int field)  
      CrontabParser.ExprContext expr​(int field)  
      org.antlr.v4.runtime.atn.ATN getATN()  
      String getErrorMessage()  
      String getGrammarFileName()  
      protected Hash getHashForTokens()  
      String[] getRuleNames()  
      String getSerializedATN()  
      String[] getTokenNames()
      Deprecated.
      org.antlr.v4.runtime.Vocabulary getVocabulary()  
      protected void rangeCheck​(int value, int field)  
      void setErrorMessage​(String errorMessage)  
      void setHash​(Hash hash)  
      CrontabParser.StartRuleContext startRule​(CronTab table)  
      CrontabParser.TermContext term​(int field)  
      CrontabParser.TokenContext token()  
      • Methods inherited from class org.antlr.v4.runtime.Parser

        addContextToParseTree, addParseListener, compileParseTreePattern, compileParseTreePattern, consume, createErrorNode, createTerminalNode, dumpDFA, dumpDFA, enterOuterAlt, enterRecursionRule, enterRecursionRule, enterRule, exitRule, getATNWithBypassAlts, getBuildParseTree, getContext, getCurrentToken, getDFAStrings, getErrorHandler, getExpectedTokens, getExpectedTokensWithinCurrentRule, getInputStream, getInvokingContext, getNumberOfSyntaxErrors, getParseInfo, getParseListeners, getPrecedence, getRuleContext, getRuleIndex, getRuleInvocationStack, getRuleInvocationStack, getSourceName, getTokenFactory, getTokenStream, getTrimParseTree, inContext, isExpectedToken, isMatchedEOF, isTrace, match, matchWildcard, notifyErrorListeners, notifyErrorListeners, precpred, pushNewRecursionContext, removeParseListener, removeParseListeners, reset, setBuildParseTree, setContext, setErrorHandler, setInputStream, setProfile, setTokenFactory, setTokenStream, setTrace, setTrimParseTree, triggerEnterRuleEvent, triggerExitRuleEvent, unrollRecursionContexts
      • Methods inherited from class org.antlr.v4.runtime.Recognizer

        action, addErrorListener, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getRuleIndexMap, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
    • Constructor Detail

      • CrontabParser

        public CrontabParser​(org.antlr.v4.runtime.TokenStream input)
    • Method Detail

      • getTokenNames

        @Deprecated
        public String[] getTokenNames()
        Deprecated.
        Specified by:
        getTokenNames in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • getVocabulary

        public org.antlr.v4.runtime.Vocabulary getVocabulary()
        Overrides:
        getVocabulary in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • getGrammarFileName

        public String getGrammarFileName()
        Specified by:
        getGrammarFileName in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • getRuleNames

        public String[] getRuleNames()
        Specified by:
        getRuleNames in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • getSerializedATN

        public String getSerializedATN()
        Overrides:
        getSerializedATN in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • getATN

        public org.antlr.v4.runtime.atn.ATN getATN()
        Specified by:
        getATN in class org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,​org.antlr.v4.runtime.atn.ParserATNSimulator>
      • startRule

        public final CrontabParser.StartRuleContext startRule​(CronTab table)
                                                       throws org.antlr.v4.runtime.RecognitionException
        Throws:
        org.antlr.v4.runtime.RecognitionException
      • expr

        public final CrontabParser.ExprContext expr​(int field)
                                             throws org.antlr.v4.runtime.RecognitionException
        Throws:
        org.antlr.v4.runtime.RecognitionException
      • term

        public final CrontabParser.TermContext term​(int field)
                                             throws org.antlr.v4.runtime.RecognitionException
        Throws:
        org.antlr.v4.runtime.RecognitionException
      • token

        public final CrontabParser.TokenContext token()
                                               throws org.antlr.v4.runtime.RecognitionException
        Throws:
        org.antlr.v4.runtime.RecognitionException
      • setHash

        public void setHash​(Hash hash)
      • getErrorMessage

        public String getErrorMessage()
      • setErrorMessage

        public void setErrorMessage​(String errorMessage)
      • doRange

        protected long doRange​(int start,
                               int end,
                               int step,
                               int field)
      • doRange

        protected long doRange​(int step,
                               int field)
      • doHash

        protected long doHash​(int step,
                              int field)
        Uses Hash to choose a random (but stable) value from within this field.
        Parameters:
        step - Increments. For example, 15 if "H/15". Or NO_STEP to indicate the special constant for "H" without the step value.
      • doHash

        protected long doHash​(int s,
                              int e,
                              int step,
                              int field)
      • rangeCheck

        protected void rangeCheck​(int value,
                                  int field)
      • getHashForTokens

        protected Hash getHashForTokens()