X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/parser/Token.java b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/parser/Token.java new file mode 100644 index 0000000..a9a2fa9 --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/parser/Token.java @@ -0,0 +1,55 @@ +package net.sourceforge.phpdt.sql.parser; + +public class Token { + public static final char SEPARATOR = 'S'; + public static final char SYMBOL = 'Y'; + public static final char LITERAL = 'L'; + public static final char IDENTIFIER = 'I'; + public static final char COMMENT = 'C'; + public static final char WHITESPACE = 'W'; + public static final char NUMERIC = 'N'; + private char type; + private int start; + private int end; + private String value; + public Token(char type, String value, int start, int end) { + this.type = type; + this.value = value; + this.start = start; + this.end = end; + } + public int getEnd() { + return end; + } + + public int getStart() { + return start; + } + + public int getType() { + return type; + } + + public String getValue() { + return value; + } + + public void setEnd(int end) { + this.end = end; + } + + public void setStart(int start) { + this.start = start; + } + + public void setType(char type) { + this.type = type; + } + + public void setValue(String value) { + this.value = value; + } + public String toString() { + return type + " ->" + value + "<- [" + start + ", " + end + "]"; + } +}