
hudson.scheduler.CrontabLexer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hudson-core Show documentation
Show all versions of hudson-core Show documentation
Contains the core Hudson code and view files to render HTML.
The newest version!
// $ANTLR 3.4 hudson/scheduler/Crontab.g 2016-02-08 18:44:26
package hudson.scheduler;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked"})
public class CrontabLexer extends Lexer {
public static final int EOF=-1;
public static final int ANNUALLY=4;
public static final int AT=5;
public static final int DAILY=6;
public static final int DIV=7;
public static final int HOURLY=8;
public static final int MIDNIGHT=9;
public static final int MINUS=10;
public static final int MONTHLY=11;
public static final int OR=12;
public static final int STAR=13;
public static final int TOKEN=14;
public static final int WEEKLY=15;
public static final int WS=16;
public static final int YEARLY=17;
// delegates
// delegators
public Lexer[] getDelegates() {
return new Lexer[] {};
}
public CrontabLexer() {}
public CrontabLexer(CharStream input) {
this(input, new RecognizerSharedState());
}
public CrontabLexer(CharStream input, RecognizerSharedState state) {
super(input,state);
}
public String getGrammarFileName() { return "hudson/scheduler/Crontab.g"; }
// $ANTLR start "TOKEN"
public final void mTOKEN() throws RecognitionException {
try {
int _type = TOKEN;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:95:3: ( ( '0' .. '9' )+ )
// hudson/scheduler/Crontab.g:95:5: ( '0' .. '9' )+
{
// hudson/scheduler/Crontab.g:95:5: ( '0' .. '9' )+
int cnt1=0;
loop1:
do {
int alt1=2;
switch ( input.LA(1) ) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
alt1=1;
}
break;
}
switch (alt1) {
case 1 :
// hudson/scheduler/Crontab.g:
{
if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
input.consume();
}
else {
MismatchedSetException mse = new MismatchedSetException(null,input);
recover(mse);
throw mse;
}
}
break;
default :
if ( cnt1 >= 1 ) break loop1;
EarlyExitException eee =
new EarlyExitException(1, input);
throw eee;
}
cnt1++;
} while (true);
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "TOKEN"
// $ANTLR start "WS"
public final void mWS() throws RecognitionException {
try {
int _type = WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:99:3: ( ( ' ' | '\\t' )+ )
// hudson/scheduler/Crontab.g:99:5: ( ' ' | '\\t' )+
{
// hudson/scheduler/Crontab.g:99:5: ( ' ' | '\\t' )+
int cnt2=0;
loop2:
do {
int alt2=2;
switch ( input.LA(1) ) {
case '\t':
case ' ':
{
alt2=1;
}
break;
}
switch (alt2) {
case 1 :
// hudson/scheduler/Crontab.g:
{
if ( input.LA(1)=='\t'||input.LA(1)==' ' ) {
input.consume();
}
else {
MismatchedSetException mse = new MismatchedSetException(null,input);
recover(mse);
throw mse;
}
}
break;
default :
if ( cnt2 >= 1 ) break loop2;
EarlyExitException eee =
new EarlyExitException(2, input);
throw eee;
}
cnt2++;
} while (true);
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "WS"
// $ANTLR start "MINUS"
public final void mMINUS() throws RecognitionException {
try {
int _type = MINUS;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:102:6: ( '-' )
// hudson/scheduler/Crontab.g:102:9: '-'
{
match('-');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "MINUS"
// $ANTLR start "STAR"
public final void mSTAR() throws RecognitionException {
try {
int _type = STAR;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:103:5: ( '*' )
// hudson/scheduler/Crontab.g:103:7: '*'
{
match('*');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "STAR"
// $ANTLR start "DIV"
public final void mDIV() throws RecognitionException {
try {
int _type = DIV;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:104:4: ( '/' )
// hudson/scheduler/Crontab.g:104:7: '/'
{
match('/');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "DIV"
// $ANTLR start "OR"
public final void mOR() throws RecognitionException {
try {
int _type = OR;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:105:3: ( ',' )
// hudson/scheduler/Crontab.g:105:7: ','
{
match(',');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "OR"
// $ANTLR start "AT"
public final void mAT() throws RecognitionException {
try {
int _type = AT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:106:3: ( '@' )
// hudson/scheduler/Crontab.g:106:7: '@'
{
match('@');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "AT"
// $ANTLR start "YEARLY"
public final void mYEARLY() throws RecognitionException {
try {
int _type = YEARLY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:108:7: ( 'yearly' )
// hudson/scheduler/Crontab.g:108:9: 'yearly'
{
match("yearly");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "YEARLY"
// $ANTLR start "ANNUALLY"
public final void mANNUALLY() throws RecognitionException {
try {
int _type = ANNUALLY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:109:9: ( 'annually' )
// hudson/scheduler/Crontab.g:109:11: 'annually'
{
match("annually");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "ANNUALLY"
// $ANTLR start "MONTHLY"
public final void mMONTHLY() throws RecognitionException {
try {
int _type = MONTHLY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:110:8: ( 'monthly' )
// hudson/scheduler/Crontab.g:110:10: 'monthly'
{
match("monthly");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "MONTHLY"
// $ANTLR start "WEEKLY"
public final void mWEEKLY() throws RecognitionException {
try {
int _type = WEEKLY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:111:7: ( 'weekly' )
// hudson/scheduler/Crontab.g:111:9: 'weekly'
{
match("weekly");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "WEEKLY"
// $ANTLR start "DAILY"
public final void mDAILY() throws RecognitionException {
try {
int _type = DAILY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:112:6: ( 'daily' )
// hudson/scheduler/Crontab.g:112:8: 'daily'
{
match("daily");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "DAILY"
// $ANTLR start "MIDNIGHT"
public final void mMIDNIGHT() throws RecognitionException {
try {
int _type = MIDNIGHT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:113:9: ( 'midnight' )
// hudson/scheduler/Crontab.g:113:11: 'midnight'
{
match("midnight");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "MIDNIGHT"
// $ANTLR start "HOURLY"
public final void mHOURLY() throws RecognitionException {
try {
int _type = HOURLY;
int _channel = DEFAULT_TOKEN_CHANNEL;
// hudson/scheduler/Crontab.g:114:7: ( 'hourly' )
// hudson/scheduler/Crontab.g:114:9: 'hourly'
{
match("hourly");
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "HOURLY"
public void mTokens() throws RecognitionException {
// hudson/scheduler/Crontab.g:1:8: ( TOKEN | WS | MINUS | STAR | DIV | OR | AT | YEARLY | ANNUALLY | MONTHLY | WEEKLY | DAILY | MIDNIGHT | HOURLY )
int alt3=14;
switch ( input.LA(1) ) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
alt3=1;
}
break;
case '\t':
case ' ':
{
alt3=2;
}
break;
case '-':
{
alt3=3;
}
break;
case '*':
{
alt3=4;
}
break;
case '/':
{
alt3=5;
}
break;
case ',':
{
alt3=6;
}
break;
case '@':
{
alt3=7;
}
break;
case 'y':
{
alt3=8;
}
break;
case 'a':
{
alt3=9;
}
break;
case 'm':
{
switch ( input.LA(2) ) {
case 'o':
{
alt3=10;
}
break;
case 'i':
{
alt3=13;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 3, 10, input);
throw nvae;
}
}
break;
case 'w':
{
alt3=11;
}
break;
case 'd':
{
alt3=12;
}
break;
case 'h':
{
alt3=14;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 3, 0, input);
throw nvae;
}
switch (alt3) {
case 1 :
// hudson/scheduler/Crontab.g:1:10: TOKEN
{
mTOKEN();
}
break;
case 2 :
// hudson/scheduler/Crontab.g:1:16: WS
{
mWS();
}
break;
case 3 :
// hudson/scheduler/Crontab.g:1:19: MINUS
{
mMINUS();
}
break;
case 4 :
// hudson/scheduler/Crontab.g:1:25: STAR
{
mSTAR();
}
break;
case 5 :
// hudson/scheduler/Crontab.g:1:30: DIV
{
mDIV();
}
break;
case 6 :
// hudson/scheduler/Crontab.g:1:34: OR
{
mOR();
}
break;
case 7 :
// hudson/scheduler/Crontab.g:1:37: AT
{
mAT();
}
break;
case 8 :
// hudson/scheduler/Crontab.g:1:40: YEARLY
{
mYEARLY();
}
break;
case 9 :
// hudson/scheduler/Crontab.g:1:47: ANNUALLY
{
mANNUALLY();
}
break;
case 10 :
// hudson/scheduler/Crontab.g:1:56: MONTHLY
{
mMONTHLY();
}
break;
case 11 :
// hudson/scheduler/Crontab.g:1:64: WEEKLY
{
mWEEKLY();
}
break;
case 12 :
// hudson/scheduler/Crontab.g:1:71: DAILY
{
mDAILY();
}
break;
case 13 :
// hudson/scheduler/Crontab.g:1:77: MIDNIGHT
{
mMIDNIGHT();
}
break;
case 14 :
// hudson/scheduler/Crontab.g:1:86: HOURLY
{
mHOURLY();
}
break;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy