1
25
26 package org.jrobin.core.timespec;
27
28 class TimeToken {
29 public static final int MIDNIGHT = 1;
30 public static final int NOON = 2;
31 public static final int TEATIME = 3;
32 public static final int PM = 4;
33 public static final int AM = 5;
34 public static final int YESTERDAY = 6;
35 public static final int TODAY = 7;
36 public static final int TOMORROW = 8;
37 public static final int NOW = 9;
38 public static final int START = 10;
39 public static final int END = 11;
40 public static final int SECONDS = 12;
41 public static final int MINUTES = 13;
42 public static final int HOURS = 14;
43 public static final int DAYS = 15;
44 public static final int WEEKS = 16;
45 public static final int MONTHS = 17;
46 public static final int YEARS = 18;
47 public static final int MONTHS_MINUTES = 19;
48 public static final int NUMBER = 20;
49 public static final int PLUS = 21;
50 public static final int MINUS = 22;
51 public static final int DOT = 23;
52 public static final int COLON = 24;
53 public static final int SLASH = 25;
54 public static final int ID = 26;
55 public static final int JUNK = 27;
56 public static final int JAN = 28;
57 public static final int FEB = 29;
58 public static final int MAR = 30;
59 public static final int APR = 31;
60 public static final int MAY = 32;
61 public static final int JUN = 33;
62 public static final int JUL = 34;
63 public static final int AUG = 35;
64 public static final int SEP = 36;
65 public static final int OCT = 37;
66 public static final int NOV = 38;
67 public static final int DEC = 39;
68 public static final int SUN = 40;
69 public static final int MON = 41;
70 public static final int TUE = 42;
71 public static final int WED = 43;
72 public static final int THU = 44;
73 public static final int FRI = 45;
74 public static final int SAT = 46;
75 public static final int EOF = -1;
76
77 final String value;
78 final int id;
79
80 public TimeToken(String value, int id) {
81 this.value = value;
82 this.id = id;
83 }
84
85 public String toString() {
86 return value + " [" + id + "]";
87 }
88 }