1 /* Generated By:JavaCC: Do not edit this line. Token.h Version 6.0 */
2 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
12 * Describes the input token stream.
20 * An integer that describes the kind of this token. This numbering
21 * system is determined by JavaCCParser, and a table of these numbers is
22 * stored in the file ...Constants.java.
26 /** The line number of the first character of this Token. */
28 /** The column number of the first character of this Token. */
30 /** The line number of the last character of this Token. */
32 /** The column number of the last character of this Token. */
36 * The string image of the token.
38 JAVACC_STRING_TYPE image;
41 * A reference to the next regular (non-special) token from the input
42 * stream. If this is the last token from the input stream, or if the
43 * token manager has not read tokens beyond this one, this field is
44 * set to NULL. This is true only if this token is also a regular
45 * token. Otherwise, see below for a description of the contents of
51 * This field is used to access special tokens that occur prior to this
52 * token, but after the immediately preceding regular (non-special) token.
53 * If there are no such special tokens, this field is set to NULL.
54 * When there are more than one such special token, this field refers
55 * to the last of these special tokens, which in turn refers to the next
56 * previous special token through its specialToken field, and so on
57 * until the first special token (whose specialToke_ field is NULL).
58 * The next fields of special tokens refer to other special tokens that
59 * immediately follow it (without an intervening regular token). If there
60 * is no such token, this field is NULL.
65 * An optional attribute value of the Token.
66 * Tokens which are not used as syntactic sugar will often contain
67 * meaningful values that will be used later on by the compiler or
68 * interpreter. This attribute value is often different from the image.
69 * Any subclass of Token that actually wants to return a non-NULL value can
70 * override this method as appropriate.
75 * No-argument constructor
80 * Constructs a new token for the specified Image.
85 * Constructs a new token for the specified Image and Kind.
87 Token(int kind, JAVACC_STRING_TYPE image);
92 JAVACC_STRING_TYPE toString();
94 public: virtual ~Token();
97 * Returns a new Token void *, by default. However, if you want, you
98 * can create and return subclass objects based on the value of ofKind.
99 * Simply add the cases to the switch for all those special cases.
100 * For example, if you have a subclass of Token called IDToken that
101 * you want to create if ofKind is ID, simply add something like :
103 * case MyParserConstants.ID : return new IDToken(ofKind, image);
105 * to the following switch statement. Then you can cast matchedToken
106 * variable to the appropriate type and use sit in your lexical actions.
108 static Token *newToken(int ofKind, JAVACC_STRING_TYPE image);
110 static Token *newToken(int ofKind);
116 /* JavaCC - OriginalChecksum=2f5eb1c937adc983dfa2008c4fe383a7 (do not edit this line) */