public class CrontabParser extends antlr.LLkParser implements CrontabParserTokenTypes
| Modifier and Type | Field and Description |
|---|---|
static String[] |
_tokenNames |
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 |
NO_STEP
Constant that indicates no step value.
|
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepthANNUALLY, AT, DAILY, DIV, EOF, H, HOURLY, LITERAL_annually, LITERAL_daily, LITERAL_H, LITERAL_hourly, LITERAL_midnight, LITERAL_monthly, LITERAL_weekly, LITERAL_yearly, LPAREN, MIDNIGHT, MINUS, MONTHLY, NULL_TREE_LOOKAHEAD, OR, RPAREN, STAR, TOKEN, WEEKLY, WS, YEARLY| Modifier | Constructor and 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) |
| Modifier and Type | Method and 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() |
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, traceIndentpublic static final String[] _tokenNames
protected Hash hash
public static boolean HASH_TOKENS
public static final int NO_STEP
protected CrontabParser(antlr.TokenBuffer tokenBuf,
int k)
public CrontabParser(antlr.TokenBuffer tokenBuf)
protected CrontabParser(antlr.TokenStream lexer,
int k)
public CrontabParser(antlr.TokenStream lexer)
public CrontabParser(antlr.ParserSharedInputState state)
public final void startRule(CronTab table) throws antlr.RecognitionException, antlr.TokenStreamException, antlr.ANTLRException
antlr.RecognitionExceptionantlr.TokenStreamExceptionantlr.ANTLRExceptionpublic final long expr(int field)
throws antlr.RecognitionException,
antlr.TokenStreamException,
antlr.ANTLRException
antlr.RecognitionExceptionantlr.TokenStreamExceptionantlr.ANTLRExceptionpublic final long term(int field)
throws antlr.RecognitionException,
antlr.TokenStreamException,
antlr.ANTLRException
antlr.RecognitionExceptionantlr.TokenStreamExceptionantlr.ANTLRExceptionpublic final int token()
throws antlr.RecognitionException,
antlr.TokenStreamException
antlr.RecognitionExceptionantlr.TokenStreamExceptionpublic void setHash(Hash hash)
protected long doRange(int start,
int end,
int step,
int field)
throws antlr.ANTLRException
antlr.ANTLRExceptionprotected long doRange(int step,
int field)
throws antlr.ANTLRException
antlr.ANTLRExceptionprotected long doHash(int step,
int field)
throws antlr.ANTLRException
Hash to choose a random (but stable) value from within this field.step - Increments. For example, 15 if "H/15". Or NO_STEP to indicate
the special constant for "H" without the step value.antlr.ANTLRExceptionprotected long doHash(int s,
int e,
int step,
int field)
throws antlr.ANTLRException
antlr.ANTLRExceptionprotected void rangeCheck(int value,
int field)
throws antlr.ANTLRException
antlr.ANTLRExceptionprotected Hash getHashForTokens()
Copyright © 2019. All rights reserved.