0N/A/*
2362N/A * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A
0N/A/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */
0N/Apackage com.sun.jmx.snmp.IPAcl;
0N/A
0N/A/**
0N/A * Describes the input token stream.
0N/A */
0N/A
0N/Aclass Token {
0N/A
0N/A /**
0N/A * An integer that describes the kind of this token. This numbering
0N/A * system is determined by JavaCCParser, and a table of these numbers is
0N/A * stored in the file ...Constants.java.
0N/A */
0N/A public int kind;
0N/A
0N/A /**
0N/A * beginLine and beginColumn describe the position of the first character
0N/A * of this token; endLine and endColumn describe the position of the
0N/A * last character of this token.
0N/A */
0N/A public int beginLine, beginColumn, endLine, endColumn;
0N/A
0N/A /**
0N/A * The string image of the token.
0N/A */
0N/A public String image;
0N/A
0N/A /**
0N/A * A reference to the next regular (non-special) token from the input
0N/A * stream. If this is the last token from the input stream, or if the
0N/A * token manager has not read tokens beyond this one, this field is
0N/A * set to null. This is true only if this token is also a regular
0N/A * token. Otherwise, see below for a description of the contents of
0N/A * this field.
0N/A */
0N/A public Token next;
0N/A
0N/A /**
0N/A * This field is used to access special tokens that occur prior to this
0N/A * token, but after the immediately preceding regular (non-special) token.
0N/A * If there are no such special tokens, this field is set to null.
0N/A * When there are more than one such special token, this field refers
0N/A * to the last of these special tokens, which in turn refers to the next
0N/A * previous special token through its specialToken field, and so on
0N/A * until the first special token (whose specialToken field is null).
0N/A * The next fields of special tokens refer to other special tokens that
0N/A * immediately follow it (without an intervening regular token). If there
0N/A * is no such token, this field is null.
0N/A */
0N/A public Token specialToken;
0N/A
0N/A /**
0N/A * Returns the image.
0N/A */
0N/A public final String toString()
0N/A {
0N/A return image;
0N/A }
0N/A
0N/A /**
0N/A * Returns a new Token object, by default. However, if you want, you
0N/A * can create and return subclass objects based on the value of ofKind.
0N/A * Simply add the cases to the switch for all those special cases.
0N/A * For example, if you have a subclass of Token called IDToken that
0N/A * you want to create if ofKind is ID, simlpy add something like :
0N/A *
0N/A * case MyParserConstants.ID : return new IDToken();
0N/A *
0N/A * to the following switch statement. Then you can cast matchedToken
0N/A * variable to the appropriate type and use it in your lexical actions.
0N/A */
0N/A public static final Token newToken(int ofKind)
0N/A {
0N/A switch(ofKind)
0N/A {
0N/A default : return new Token();
0N/A }
0N/A }
0N/A
0N/A}