Class CrontabParser

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        CrontabParser​(antlr.ParserSharedInputState state)  
        CrontabParser​(antlr.TokenBuffer tokenBuf)  
      protected CrontabParser​(antlr.TokenBuffer tokenBuf, int k)  
        CrontabParser​(antlr.TokenStream lexer)  
      protected CrontabParser​(antlr.TokenStream lexer, int k)  
    • Method Summary

      All Methods Instance Methods Concrete 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)  
      long expr​(int field)  
      protected Hash getHashForTokens()  
      protected void rangeCheck​(int value, int field)  
      void setHash​(Hash hash)  
      void startRule​(CronTab table)  
      long term​(int field)  
      int token()  
      • Methods inherited from class antlr.LLkParser

        consume, LA, LT, traceIn, traceOut
      • Methods inherited from class antlr.Parser

        addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
    • Field Detail

      • _tokenNames

        public static final String[] _tokenNames
      • hash

        protected Hash hash
        Used to pick a value from within the range
      • HASH_TOKENS

        public static boolean HASH_TOKENS
        This property hashes tokens in the cron tab tokens like @daily so that they spread evenly.
      • NO_STEP

        public static final int NO_STEP
        Constant that indicates no step value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CrontabParser

        protected CrontabParser​(antlr.TokenBuffer tokenBuf,
                                int k)
      • CrontabParser

        public CrontabParser​(antlr.TokenBuffer tokenBuf)
      • CrontabParser

        protected CrontabParser​(antlr.TokenStream lexer,
                                int k)
      • CrontabParser

        public CrontabParser​(antlr.TokenStream lexer)
      • CrontabParser

        public CrontabParser​(antlr.ParserSharedInputState state)
    • Method Detail

      • startRule

        public final void startRule​(CronTab table)
                             throws antlr.RecognitionException,
                                    antlr.TokenStreamException,
                                    antlr.ANTLRException
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
        antlr.ANTLRException
      • expr

        public final long expr​(int field)
                        throws antlr.RecognitionException,
                               antlr.TokenStreamException,
                               antlr.ANTLRException
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
        antlr.ANTLRException
      • term

        public final long term​(int field)
                        throws antlr.RecognitionException,
                               antlr.TokenStreamException,
                               antlr.ANTLRException
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
        antlr.ANTLRException
      • token

        public final int token()
                        throws antlr.RecognitionException,
                               antlr.TokenStreamException
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • setHash

        public void setHash​(Hash hash)
      • doRange

        protected long doRange​(int start,
                               int end,
                               int step,
                               int field)
                        throws antlr.ANTLRException
        Throws:
        antlr.ANTLRException
      • doRange

        protected long doRange​(int step,
                               int field)
                        throws antlr.ANTLRException
        Throws:
        antlr.ANTLRException
      • doHash

        protected long doHash​(int step,
                              int field)
                       throws antlr.ANTLRException
        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.
        Throws:
        antlr.ANTLRException
      • doHash

        protected long doHash​(int s,
                              int e,
                              int step,
                              int field)
                       throws antlr.ANTLRException
        Throws:
        antlr.ANTLRException
      • rangeCheck

        protected void rangeCheck​(int value,
                                  int field)
                           throws antlr.ANTLRException
        Throws:
        antlr.ANTLRException
      • getHashForTokens

        protected Hash getHashForTokens()