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, traceDepth
ANNUALLY, 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, traceIndent
public 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.RecognitionException
antlr.TokenStreamException
antlr.ANTLRException
public final long expr(int field) throws antlr.RecognitionException, antlr.TokenStreamException, antlr.ANTLRException
antlr.RecognitionException
antlr.TokenStreamException
antlr.ANTLRException
public final long term(int field) throws antlr.RecognitionException, antlr.TokenStreamException, antlr.ANTLRException
antlr.RecognitionException
antlr.TokenStreamException
antlr.ANTLRException
public final int token() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public void setHash(Hash hash)
protected long doRange(int start, int end, int step, int field) throws antlr.ANTLRException
antlr.ANTLRException
protected long doRange(int step, int field) throws antlr.ANTLRException
antlr.ANTLRException
protected 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.ANTLRException
protected long doHash(int s, int e, int step, int field) throws antlr.ANTLRException
antlr.ANTLRException
protected void rangeCheck(int value, int field) throws antlr.ANTLRException
antlr.ANTLRException
protected Hash getHashForTokens()
Copyright © 2004–2021. All rights reserved.