Package hudson.scheduler
Class CrontabParser
- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
- org.antlr.v4.runtime.Parser
-
- hudson.scheduler.CrontabParser
-
public class CrontabParser extends org.antlr.v4.runtime.Parser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CrontabParser.ExprContext
static class
CrontabParser.StartRuleContext
static class
CrontabParser.TermContext
static class
CrontabParser.TokenContext
-
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 rangestatic 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.UseVOCABULARY
instead.static org.antlr.v4.runtime.Vocabulary
VOCABULARY
static int
WEEKLY
static int
WS
static int
YEARLY
-
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)
UsesHash
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
-
-
-
-
Field Detail
-
_decisionToDFA
protected static final org.antlr.v4.runtime.dfa.DFA[] _decisionToDFA
-
_sharedContextCache
protected static final org.antlr.v4.runtime.atn.PredictionContextCache _sharedContextCache
-
TOKEN
public static final int TOKEN
- See Also:
- Constant Field Values
-
WS
public static final int WS
- See Also:
- Constant Field Values
-
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
-
STAR
public static final int STAR
- See Also:
- Constant Field Values
-
DIV
public static final int DIV
- See Also:
- Constant Field Values
-
OR
public static final int OR
- See Also:
- Constant Field Values
-
AT
public static final int AT
- See Also:
- Constant Field Values
-
H
public static final int H
- See Also:
- Constant Field Values
-
LPAREN
public static final int LPAREN
- See Also:
- Constant Field Values
-
RPAREN
public static final int RPAREN
- See Also:
- Constant Field Values
-
YEARLY
public static final int YEARLY
- See Also:
- Constant Field Values
-
ANNUALLY
public static final int ANNUALLY
- See Also:
- Constant Field Values
-
MONTHLY
public static final int MONTHLY
- See Also:
- Constant Field Values
-
WEEKLY
public static final int WEEKLY
- See Also:
- Constant Field Values
-
DAILY
public static final int DAILY
- See Also:
- Constant Field Values
-
MIDNIGHT
public static final int MIDNIGHT
- See Also:
- Constant Field Values
-
HOURLY
public static final int HOURLY
- See Also:
- Constant Field Values
-
RULE_startRule
public static final int RULE_startRule
- See Also:
- Constant Field Values
-
RULE_expr
public static final int RULE_expr
- See Also:
- Constant Field Values
-
RULE_term
public static final int RULE_term
- See Also:
- Constant Field Values
-
RULE_token
public static final int RULE_token
- See Also:
- Constant Field Values
-
ruleNames
public static final String[] ruleNames
-
VOCABULARY
public static final org.antlr.v4.runtime.Vocabulary VOCABULARY
-
tokenNames
@Deprecated public static final String[] tokenNames
Deprecated.UseVOCABULARY
instead.
-
_serializedATN
public static final String _serializedATN
- See Also:
- Constant Field Values
-
_ATN
public static final org.antlr.v4.runtime.atn.ATN _ATN
-
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
-
-
Method Detail
-
getTokenNames
@Deprecated public String[] getTokenNames()
Deprecated.- Specified by:
getTokenNames
in classorg.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 classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getGrammarFileName
public String getGrammarFileName()
- Specified by:
getGrammarFileName
in classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getRuleNames
public String[] getRuleNames()
- Specified by:
getRuleNames
in classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getSerializedATN
public String getSerializedATN()
- Overrides:
getSerializedATN
in classorg.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 classorg.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)
UsesHash
to choose a random (but stable) value from within this field.- Parameters:
step
- Increments. For example, 15 if "H/15". OrNO_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()
-
-