01: /*
02: * The contents of this file are subject to the Mozilla Public License
03: * Version 1.1 (the "License"); you may not use this file except in
04: * compliance with the License. You may obtain a copy of the License at
05: * http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
09: * License for the specific language governing rights and limitations
10: * under the License.
11: *
12: * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
13: *
14: * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
15: * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
16: *
17: * Contributor(s):
18: * Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
19: *
20: * If you didn't download this code from the following link, you should check
21: * if you aren't using an obsolete version: http://www.isqlviewer.com
22: */
23: package org.isqlviewer.sql.processor;
24:
25: /**
26: * A token that has been parsed and interpreted as significant data.
27: * <p>
28: *
29: * @author Mark A. Kobold <mkobold at isqlviewer dot com>
30: * @version 1.0
31: */
32: public class Token {
33:
34: /**
35: * The symbol contains all the properties shared with similar tokens.
36: */
37: public TextSymbol symbol;
38:
39: /**
40: * The token's position is given by an index into the document text.
41: */
42: public int position;
43:
44: /**
45: * Create a token with a given symbol and position.
46: */
47: Token(TextSymbol symbol, int position) {
48:
49: this.symbol = symbol;
50: this.position = position;
51: }
52: }
|