SQL Plugin copied from Quantum plugin and refactored for PHPEclipse
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / parser / Token.java
1 package net.sourceforge.phpdt.sql.parser;
2
3 public class Token {
4         public static final char SEPARATOR = 'S';
5         public static final char SYMBOL = 'Y';
6         public static final char LITERAL = 'L';
7         public static final char IDENTIFIER = 'I';
8         public static final char COMMENT = 'C';
9         public static final char WHITESPACE = 'W';
10         public static final char NUMERIC = 'N';
11         private char type;
12         private int start;
13         private int end;
14         private String value;
15         public Token(char type, String value, int start, int end) {
16                 this.type = type;
17                 this.value = value;
18                 this.start = start;
19                 this.end = end;
20         }
21         public int getEnd() {
22                 return end;
23         }
24
25         public int getStart() {
26                 return start;
27         }
28
29         public int getType() {
30                 return type;
31         }
32
33         public String getValue() {
34                 return value;
35         }
36
37         public void setEnd(int end) {
38                 this.end = end;
39         }
40
41         public void setStart(int start) {
42                 this.start = start;
43         }
44
45         public void setType(char type) {
46                 this.type = type;
47         }
48
49         public void setValue(String value) {
50                 this.value = value;
51         }
52         public String toString() {
53                 return type + " ->" + value + "<- [" + start + ", " + end + "]";
54         }
55 }