1	package antlr;
2	
3	/**
4	 * <b>SOFTWARE RIGHTS</b>
5	 * <p>
6	 * ANTLR 2.5.0 MageLang Institute, 1998
7	 * <p>
8	 * We reserve no legal rights to the ANTLR--it is fully in the
9	 * public domain. An individual or company may do whatever
10	 * they wish with source code distributed with ANTLR or the
11	 * code generated by ANTLR, including the incorporation of
12	 * ANTLR, or its output, into commerical software.
13	 * <p>
14	 * We encourage users to develop software with ANTLR. However,
15	 * we do ask that credit is given to us for developing
16	 * ANTLR. By "credit", we mean that if you use ANTLR or
17	 * incorporate any source code into one of your programs
18	 * (commercial product, research project, or otherwise) that
19	 * you acknowledge this fact somewhere in the documentation,
20	 * research report, etc... If you like ANTLR and have
21	 * developed a nice tool with the output, please mention that
22	 * you developed it using ANTLR. In addition, we ask that the
23	 * headers remain intact in our source code. As long as these
24	 * guidelines are kept, we expect to continue enhancing this
25	 * system and expect to make other tools available as they are
26	 * completed.
27	 * <p>
28	 * The ANTLR gang:
29	 * @version ANTLR 2.5.0 MageLang Institute, 1998
30	 * @author Terence Parr, <a href=http://www.MageLang.com>MageLang Institute</a>
31	 * @author <br>John Lilley, <a href=http://www.Empathy.com>Empathy Software</a>
32	 */
33	// Hmm...what to do about the text of the token???
34	
35	public class Token {
36		// constants
37		public static final int MIN_USER_TYPE = 4;
38		public static final int NULL_TREE_LOOKAHEAD = 3;
39		public static final int INVALID_TYPE = 0;
40		public static final int EOF_TYPE = 1;
41		public static final int SKIP = -1;
42		
43		// each Token has at least a token type
44		int type=INVALID_TYPE;
45		
46		// the illegal token object
47		public static Token badToken = new Token(INVALID_TYPE, "<no text>");
48	
49	
50		public Token() {;}
51		public Token(int t) { type = t; }
52		public Token(int t, String txt) { type = t; setText(txt); }
53		public int getColumn() { return 0; }
54		public int getLine() { return 0; }
55		public String getText() { return "<no text>"; }
56		public int getType() { return type; }
57		public void setColumn(int c) {;}
58		public void setCharNum(int c) {;}
59		public void setLine(int l) {;}
60		public void setText(String t) {;}
61		public void setType(int t) { type = t; }
62		public String toString() {
63			return "[\""+getText()+"\",<"+type+">]";
64		}
65	}
66