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 classCrontabParser.ExprContextstatic classCrontabParser.StartRuleContextstatic classCrontabParser.TermContextstatic classCrontabParser.TokenContext
-
Field Summary
Fields Modifier and Type Field Description static org.antlr.v4.runtime.atn.ATN_ATNprotected static org.antlr.v4.runtime.dfa.DFA[]_decisionToDFAstatic String_serializedATNprotected static org.antlr.v4.runtime.atn.PredictionContextCache_sharedContextCachestatic intANNUALLYstatic intATstatic intDAILYstatic intDIVstatic intHprotected HashhashUsed to pick a value from within the rangestatic booleanHASH_TOKENSThis property hashes tokens in the cron tab tokens like @daily so that they spread evenly.static intHOURLYstatic intLPARENstatic intMIDNIGHTstatic intMINUSstatic intMONTHLYstatic intNO_STEPConstant that indicates no step value.static intORstatic intRPARENstatic intRULE_exprstatic intRULE_startRulestatic intRULE_termstatic intRULE_tokenstatic String[]ruleNamesstatic intSTARstatic intTOKENstatic String[]tokenNamesDeprecated.UseVOCABULARYinstead.static org.antlr.v4.runtime.VocabularyVOCABULARYstatic intWEEKLYstatic intWSstatic intYEARLY
-
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 longdoHash(int step, int field)UsesHashto choose a random (but stable) value from within this field.protected longdoHash(int s, int e, int step, int field)protected longdoRange(int step, int field)protected longdoRange(int start, int end, int step, int field)CrontabParser.ExprContextexpr(int field)org.antlr.v4.runtime.atn.ATNgetATN()StringgetErrorMessage()StringgetGrammarFileName()protected HashgetHashForTokens()String[]getRuleNames()StringgetSerializedATN()String[]getTokenNames()Deprecated.org.antlr.v4.runtime.VocabularygetVocabulary()protected voidrangeCheck(int value, int field)voidsetErrorMessage(String errorMessage)voidsetHash(Hash hash)CrontabParser.StartRuleContextstartRule(CronTab table)CrontabParser.TermContextterm(int field)CrontabParser.TokenContexttoken()-
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.UseVOCABULARYinstead.
-
_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:
getTokenNamesin 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:
getVocabularyin classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getGrammarFileName
public String getGrammarFileName()
- Specified by:
getGrammarFileNamein classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getRuleNames
public String[] getRuleNames()
- Specified by:
getRuleNamesin classorg.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
getSerializedATN
public String getSerializedATN()
- Overrides:
getSerializedATNin 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:
getATNin 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)UsesHashto choose a random (but stable) value from within this field.- Parameters:
step- Increments. For example, 15 if "H/15". OrNO_STEPto 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()
-
-