|
1 |
| |
|
2 |
| package org.objectledge.scheduler.cron; |
|
3 |
| import java.io.StringReader; |
|
4 |
| import java.io.FileInputStream; |
|
5 |
| import java.io.InputStreamReader; |
|
6 |
| import java.io.PrintWriter; |
|
7 |
| import java.io.Reader; |
|
8 |
| import java.util.ArrayList; |
|
9 |
| import java.util.List; |
|
10 |
| import java.util.Iterator; |
|
11 |
| import java.util.Collections; |
|
12 |
| |
|
13 |
| public class CronParserTokenManager implements CronParserConstants |
|
14 |
| { |
|
15 |
| public java.io.PrintStream debugStream = System.out; |
|
16 |
0
| public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
|
|
17 |
46
| private final int jjStopStringLiteralDfa_0(int pos, long active0)
|
|
18 |
| { |
|
19 |
46
| switch (pos)
|
|
20 |
| { |
|
21 |
46
| default :
|
|
22 |
46
| return -1;
|
|
23 |
| } |
|
24 |
| } |
|
25 |
46
| private final int jjStartNfa_0(int pos, long active0)
|
|
26 |
| { |
|
27 |
46
| return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
|
|
28 |
| } |
|
29 |
3082
| private final int jjStopAtPos(int pos, int kind)
|
|
30 |
| { |
|
31 |
3082
| jjmatchedKind = kind;
|
|
32 |
3082
| jjmatchedPos = pos;
|
|
33 |
3082
| return pos + 1;
|
|
34 |
| } |
|
35 |
0
| private final int jjStartNfaWithStates_0(int pos, int kind, int state)
|
|
36 |
| { |
|
37 |
0
| jjmatchedKind = kind;
|
|
38 |
0
| jjmatchedPos = pos;
|
|
39 |
0
| try { curChar = input_stream.readChar(); }
|
|
40 |
0
| catch(java.io.IOException e) { return pos + 1; }
|
|
41 |
0
| return jjMoveNfa_0(state, pos + 1);
|
|
42 |
| } |
|
43 |
3312
| private final int jjMoveStringLiteralDfa0_0()
|
|
44 |
| { |
|
45 |
3312
| switch(curChar)
|
|
46 |
| { |
|
47 |
0
| case 10:
|
|
48 |
0
| return jjStopAtPos(0, 35);
|
|
49 |
2760
| case 42:
|
|
50 |
2760
| return jjStopAtPos(0, 8);
|
|
51 |
0
| case 44:
|
|
52 |
0
| return jjStopAtPos(0, 7);
|
|
53 |
46
| case 45:
|
|
54 |
46
| return jjStopAtPos(0, 5);
|
|
55 |
46
| case 47:
|
|
56 |
46
| return jjStopAtPos(0, 6);
|
|
57 |
46
| case 64:
|
|
58 |
46
| return jjMoveStringLiteralDfa1_0(0x7f0000000L);
|
|
59 |
0
| case 97:
|
|
60 |
0
| return jjMoveStringLiteralDfa1_0(0x11000L);
|
|
61 |
0
| case 100:
|
|
62 |
0
| return jjMoveStringLiteralDfa1_0(0x100000L);
|
|
63 |
46
| case 102:
|
|
64 |
46
| return jjMoveStringLiteralDfa1_0(0x2000400L);
|
|
65 |
92
| case 106:
|
|
66 |
92
| return jjMoveStringLiteralDfa1_0(0xc200L);
|
|
67 |
92
| case 109:
|
|
68 |
92
| return jjMoveStringLiteralDfa1_0(0x202800L);
|
|
69 |
0
| case 110:
|
|
70 |
0
| return jjMoveStringLiteralDfa1_0(0x80000L);
|
|
71 |
0
| case 111:
|
|
72 |
0
| return jjMoveStringLiteralDfa1_0(0x40000L);
|
|
73 |
0
| case 115:
|
|
74 |
0
| return jjMoveStringLiteralDfa1_0(0xc020000L);
|
|
75 |
0
| case 116:
|
|
76 |
0
| return jjMoveStringLiteralDfa1_0(0x1400000L);
|
|
77 |
0
| case 119:
|
|
78 |
0
| return jjMoveStringLiteralDfa1_0(0x800000L);
|
|
79 |
184
| default :
|
|
80 |
184
| return jjMoveNfa_0(0, 0);
|
|
81 |
| } |
|
82 |
| } |
|
83 |
276
| private final int jjMoveStringLiteralDfa1_0(long active0)
|
|
84 |
| { |
|
85 |
276
| try { curChar = input_stream.readChar(); }
|
|
86 |
| catch(java.io.IOException e) { |
|
87 |
0
| jjStopStringLiteralDfa_0(0, active0);
|
|
88 |
0
| return 1;
|
|
89 |
| } |
|
90 |
276
| switch(curChar)
|
|
91 |
| { |
|
92 |
92
| case 97:
|
|
93 |
92
| return jjMoveStringLiteralDfa2_0(active0, 0x44002a00L);
|
|
94 |
0
| case 99:
|
|
95 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x40000L);
|
|
96 |
0
| case 100:
|
|
97 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x100000000L);
|
|
98 |
0
| case 101:
|
|
99 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x920400L);
|
|
100 |
0
| case 104:
|
|
101 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x401000000L);
|
|
102 |
0
| case 109:
|
|
103 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x280000000L);
|
|
104 |
138
| case 111:
|
|
105 |
138
| return jjMoveStringLiteralDfa2_0(active0, 0x280000L);
|
|
106 |
0
| case 112:
|
|
107 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
|
|
108 |
0
| case 114:
|
|
109 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x12000000L);
|
|
110 |
0
| case 117:
|
|
111 |
0
| return jjMoveStringLiteralDfa2_0(active0, 0x841c000L);
|
|
112 |
46
| case 121:
|
|
113 |
46
| return jjMoveStringLiteralDfa2_0(active0, 0x20000000L);
|
|
114 |
0
| default :
|
|
115 |
0
| break;
|
|
116 |
| } |
|
117 |
0
| return jjStartNfa_0(0, active0);
|
|
118 |
| } |
|
119 |
276
| private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
|
|
120 |
| { |
|
121 |
276
| if (((active0 &= old0)) == 0L)
|
|
122 |
46
| return jjStartNfa_0(0, old0);
|
|
123 |
230
| try { curChar = input_stream.readChar(); }
|
|
124 |
| catch(java.io.IOException e) { |
|
125 |
0
| jjStopStringLiteralDfa_0(1, active0);
|
|
126 |
0
| return 2;
|
|
127 |
| } |
|
128 |
230
| switch(curChar)
|
|
129 |
| { |
|
130 |
0
| case 97:
|
|
131 |
0
| return jjMoveStringLiteralDfa3_0(active0, 0x100000000L);
|
|
132 |
0
| case 98:
|
|
133 |
0
| if ((active0 & 0x400L) != 0L)
|
|
134 |
0
| return jjStopAtPos(2, 10);
|
|
135 |
0
| break;
|
|
136 |
0
| case 99:
|
|
137 |
0
| if ((active0 & 0x100000L) != 0L)
|
|
138 |
0
| return jjStopAtPos(2, 20);
|
|
139 |
0
| break;
|
|
140 |
0
| case 100:
|
|
141 |
0
| if ((active0 & 0x800000L) != 0L)
|
|
142 |
0
| return jjStopAtPos(2, 23);
|
|
143 |
0
| break;
|
|
144 |
46
| case 101:
|
|
145 |
46
| if ((active0 & 0x400000L) != 0L)
|
|
146 |
0
| return jjStopAtPos(2, 22);
|
|
147 |
46
| return jjMoveStringLiteralDfa3_0(active0, 0x30000000L);
|
|
148 |
0
| case 103:
|
|
149 |
0
| if ((active0 & 0x10000L) != 0L)
|
|
150 |
0
| return jjStopAtPos(2, 16);
|
|
151 |
0
| break;
|
|
152 |
0
| case 105:
|
|
153 |
0
| if ((active0 & 0x2000000L) != 0L)
|
|
154 |
0
| return jjStopAtPos(2, 25);
|
|
155 |
0
| return jjMoveStringLiteralDfa3_0(active0, 0x200000000L);
|
|
156 |
0
| case 108:
|
|
157 |
0
| if ((active0 & 0x8000L) != 0L)
|
|
158 |
0
| return jjStopAtPos(2, 15);
|
|
159 |
0
| break;
|
|
160 |
184
| case 110:
|
|
161 |
184
| if ((active0 & 0x200L) != 0L)
|
|
162 |
92
| return jjStopAtPos(2, 9);
|
|
163 |
92
| else if ((active0 & 0x4000L) != 0L)
|
|
164 |
0
| return jjStopAtPos(2, 14);
|
|
165 |
92
| else if ((active0 & 0x200000L) != 0L)
|
|
166 |
92
| return jjStopAtPos(2, 21);
|
|
167 |
0
| else if ((active0 & 0x8000000L) != 0L)
|
|
168 |
0
| return jjStopAtPos(2, 27);
|
|
169 |
0
| return jjMoveStringLiteralDfa3_0(active0, 0x40000000L);
|
|
170 |
0
| case 111:
|
|
171 |
0
| return jjMoveStringLiteralDfa3_0(active0, 0x480000000L);
|
|
172 |
0
| case 112:
|
|
173 |
0
| if ((active0 & 0x20000L) != 0L)
|
|
174 |
0
| return jjStopAtPos(2, 17);
|
|
175 |
0
| break;
|
|
176 |
0
| case 114:
|
|
177 |
0
| if ((active0 & 0x800L) != 0L)
|
|
178 |
0
| return jjStopAtPos(2, 11);
|
|
179 |
0
| else if ((active0 & 0x1000L) != 0L)
|
|
180 |
0
| return jjStopAtPos(2, 12);
|
|
181 |
0
| break;
|
|
182 |
0
| case 116:
|
|
183 |
0
| if ((active0 & 0x40000L) != 0L)
|
|
184 |
0
| return jjStopAtPos(2, 18);
|
|
185 |
0
| else if ((active0 & 0x4000000L) != 0L)
|
|
186 |
0
| return jjStopAtPos(2, 26);
|
|
187 |
0
| break;
|
|
188 |
0
| case 117:
|
|
189 |
0
| if ((active0 & 0x1000000L) != 0L)
|
|
190 |
0
| return jjStopAtPos(2, 24);
|
|
191 |
0
| break;
|
|
192 |
0
| case 118:
|
|
193 |
0
| if ((active0 & 0x80000L) != 0L)
|
|
194 |
0
| return jjStopAtPos(2, 19);
|
|
195 |
0
| break;
|
|
196 |
0
| case 121:
|
|
197 |
0
| if ((active0 & 0x2000L) != 0L)
|
|
198 |
0
| return jjStopAtPos(2, 13);
|
|
199 |
0
| break;
|
|
200 |
0
| default :
|
|
201 |
0
| break;
|
|
202 |
| } |
|
203 |
0
| return jjStartNfa_0(1, active0);
|
|
204 |
| } |
|
205 |
46
| private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
|
|
206 |
| { |
|
207 |
46
| if (((active0 &= old0)) == 0L)
|
|
208 |
0
| return jjStartNfa_0(1, old0);
|
|
209 |
46
| try { curChar = input_stream.readChar(); }
|
|
210 |
| catch(java.io.IOException e) { |
|
211 |
0
| jjStopStringLiteralDfa_0(2, active0);
|
|
212 |
0
| return 3;
|
|
213 |
| } |
|
214 |
46
| switch(curChar)
|
|
215 |
| { |
|
216 |
46
| case 97:
|
|
217 |
46
| return jjMoveStringLiteralDfa4_0(active0, 0x20000000L);
|
|
218 |
0
| case 98:
|
|
219 |
0
| return jjMoveStringLiteralDfa4_0(active0, 0x10000000L);
|
|
220 |
0
| case 100:
|
|
221 |
0
| return jjMoveStringLiteralDfa4_0(active0, 0x200000000L);
|
|
222 |
0
| case 105:
|
|
223 |
0
| return jjMoveStringLiteralDfa4_0(active0, 0x100000000L);
|
|
224 |
0
| case 110:
|
|
225 |
0
| return jjMoveStringLiteralDfa4_0(active0, 0xc0000000L);
|
|
226 |
0
| case 117:
|
|
227 |
0
| return jjMoveStringLiteralDfa4_0(active0, 0x400000000L);
|
|
228 |
0
| default :
|
|
229 |
0
| break;
|
|
230 |
| } |
|
231 |
0
| return jjStartNfa_0(2, active0);
|
|
232 |
| } |
|
233 |
46
| private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
|
|
234 |
| { |
|
235 |
46
| if (((active0 &= old0)) == 0L)
|
|
236 |
0
| return jjStartNfa_0(2, old0);
|
|
237 |
46
| try { curChar = input_stream.readChar(); }
|
|
238 |
| catch(java.io.IOException e) { |
|
239 |
0
| jjStopStringLiteralDfa_0(3, active0);
|
|
240 |
0
| return 4;
|
|
241 |
| } |
|
242 |
46
| switch(curChar)
|
|
243 |
| { |
|
244 |
0
| case 108:
|
|
245 |
0
| return jjMoveStringLiteralDfa5_0(active0, 0x100000000L);
|
|
246 |
0
| case 110:
|
|
247 |
0
| return jjMoveStringLiteralDfa5_0(active0, 0x200000000L);
|
|
248 |
0
| case 111:
|
|
249 |
0
| return jjMoveStringLiteralDfa5_0(active0, 0x10000000L);
|
|
250 |
46
| case 114:
|
|
251 |
46
| return jjMoveStringLiteralDfa5_0(active0, 0x420000000L);
|
|
252 |
0
| case 116:
|
|
253 |
0
| return jjMoveStringLiteralDfa5_0(active0, 0x80000000L);
|
|
254 |
0
| case 117:
|
|
255 |
0
| return jjMoveStringLiteralDfa5_0(active0, 0x40000000L);
|
|
256 |
0
| default :
|
|
257 |
0
| break;
|
|
258 |
| } |
|
259 |
0
| return jjStartNfa_0(3, active0);
|
|
260 |
| } |
|
261 |
46
| private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
|
|
262 |
| { |
|
263 |
46
| if (((active0 &= old0)) == 0L)
|
|
264 |
0
| return jjStartNfa_0(3, old0);
|
|
265 |
46
| try { curChar = input_stream.readChar(); }
|
|
266 |
| catch(java.io.IOException e) { |
|
267 |
0
| jjStopStringLiteralDfa_0(4, active0);
|
|
268 |
0
| return 5;
|
|
269 |
| } |
|
270 |
46
| switch(curChar)
|
|
271 |
| { |
|
272 |
0
| case 97:
|
|
273 |
0
| return jjMoveStringLiteralDfa6_0(active0, 0x40000000L);
|
|
274 |
0
| case 104:
|
|
275 |
0
| return jjMoveStringLiteralDfa6_0(active0, 0x80000000L);
|
|
276 |
0
| case 105:
|
|
277 |
0
| return jjMoveStringLiteralDfa6_0(active0, 0x200000000L);
|
|
278 |
46
| case 108:
|
|
279 |
46
| return jjMoveStringLiteralDfa6_0(active0, 0x420000000L);
|
|
280 |
0
| case 111:
|
|
281 |
0
| return jjMoveStringLiteralDfa6_0(active0, 0x10000000L);
|
|
282 |
0
| case 121:
|
|
283 |
0
| if ((active0 & 0x100000000L) != 0L)
|
|
284 |
0
| return jjStopAtPos(5, 32);
|
|
285 |
0
| break;
|
|
286 |
0
| default :
|
|
287 |
0
| break;
|
|
288 |
| } |
|
289 |
0
| return jjStartNfa_0(4, active0);
|
|
290 |
| } |
|
291 |
46
| private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
|
|
292 |
| { |
|
293 |
46
| if (((active0 &= old0)) == 0L)
|
|
294 |
0
| return jjStartNfa_0(4, old0);
|
|
295 |
46
| try { curChar = input_stream.readChar(); }
|
|
296 |
| catch(java.io.IOException e) { |
|
297 |
0
| jjStopStringLiteralDfa_0(5, active0);
|
|
298 |
0
| return 6;
|
|
299 |
| } |
|
300 |
46
| switch(curChar)
|
|
301 |
| { |
|
302 |
0
| case 103:
|
|
303 |
0
| return jjMoveStringLiteralDfa7_0(active0, 0x200000000L);
|
|
304 |
0
| case 108:
|
|
305 |
0
| return jjMoveStringLiteralDfa7_0(active0, 0xc0000000L);
|
|
306 |
0
| case 116:
|
|
307 |
0
| if ((active0 & 0x10000000L) != 0L)
|
|
308 |
0
| return jjStopAtPos(6, 28);
|
|
309 |
0
| break;
|
|
310 |
46
| case 121:
|
|
311 |
46
| if ((active0 & 0x20000000L) != 0L)
|
|
312 |
46
| return jjStopAtPos(6, 29);
|
|
313 |
0
| else if ((active0 & 0x400000000L) != 0L)
|
|
314 |
0
| return jjStopAtPos(6, 34);
|
|
315 |
0
| break;
|
|
316 |
0
| default :
|
|
317 |
0
| break;
|
|
318 |
| } |
|
319 |
0
| return jjStartNfa_0(5, active0);
|
|
320 |
| } |
|
321 |
0
| private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
|
|
322 |
| { |
|
323 |
0
| if (((active0 &= old0)) == 0L)
|
|
324 |
0
| return jjStartNfa_0(5, old0);
|
|
325 |
0
| try { curChar = input_stream.readChar(); }
|
|
326 |
| catch(java.io.IOException e) { |
|
327 |
0
| jjStopStringLiteralDfa_0(6, active0);
|
|
328 |
0
| return 7;
|
|
329 |
| } |
|
330 |
0
| switch(curChar)
|
|
331 |
| { |
|
332 |
0
| case 104:
|
|
333 |
0
| return jjMoveStringLiteralDfa8_0(active0, 0x200000000L);
|
|
334 |
0
| case 108:
|
|
335 |
0
| return jjMoveStringLiteralDfa8_0(active0, 0x40000000L);
|
|
336 |
0
| case 121:
|
|
337 |
0
| if ((active0 & 0x80000000L) != 0L)
|
|
338 |
0
| return jjStopAtPos(7, 31);
|
|
339 |
0
| break;
|
|
340 |
0
| default :
|
|
341 |
0
| break;
|
|
342 |
| } |
|
343 |
0
| return jjStartNfa_0(6, active0);
|
|
344 |
| } |
|
345 |
0
| private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
|
|
346 |
| { |
|
347 |
0
| if (((active0 &= old0)) == 0L)
|
|
348 |
0
| return jjStartNfa_0(6, old0);
|
|
349 |
0
| try { curChar = input_stream.readChar(); }
|
|
350 |
| catch(java.io.IOException e) { |
|
351 |
0
| jjStopStringLiteralDfa_0(7, active0);
|
|
352 |
0
| return 8;
|
|
353 |
| } |
|
354 |
0
| switch(curChar)
|
|
355 |
| { |
|
356 |
0
| case 116:
|
|
357 |
0
| if ((active0 & 0x200000000L) != 0L)
|
|
358 |
0
| return jjStopAtPos(8, 33);
|
|
359 |
0
| break;
|
|
360 |
0
| case 121:
|
|
361 |
0
| if ((active0 & 0x40000000L) != 0L)
|
|
362 |
0
| return jjStopAtPos(8, 30);
|
|
363 |
0
| break;
|
|
364 |
0
| default :
|
|
365 |
0
| break;
|
|
366 |
| } |
|
367 |
0
| return jjStartNfa_0(7, active0);
|
|
368 |
| } |
|
369 |
0
| private final void jjCheckNAdd(int state)
|
|
370 |
| { |
|
371 |
0
| if (jjrounds[state] != jjround)
|
|
372 |
| { |
|
373 |
0
| jjstateSet[jjnewStateCnt++] = state;
|
|
374 |
0
| jjrounds[state] = jjround;
|
|
375 |
| } |
|
376 |
| } |
|
377 |
0
| private final void jjAddStates(int start, int end)
|
|
378 |
| { |
|
379 |
0
| do {
|
|
380 |
0
| jjstateSet[jjnewStateCnt++] = jjnextStates[start];
|
|
381 |
0
| } while (start++ != end);
|
|
382 |
| } |
|
383 |
0
| private final void jjCheckNAddTwoStates(int state1, int state2)
|
|
384 |
| { |
|
385 |
0
| jjCheckNAdd(state1);
|
|
386 |
0
| jjCheckNAdd(state2);
|
|
387 |
| } |
|
388 |
0
| private final void jjCheckNAddStates(int start, int end)
|
|
389 |
| { |
|
390 |
0
| do {
|
|
391 |
0
| jjCheckNAdd(jjnextStates[start]);
|
|
392 |
0
| |