Blame vhdlparser/Token.h

Packit Service 50c9f2
/* Generated By:JavaCC: Do not edit this line. Token.h Version 6.0 */
Packit Service 50c9f2
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
Packit Service 50c9f2
#ifndef TOKEN_H
Packit Service 50c9f2
#define TOKEN_H
Packit Service 50c9f2
#include "JavaCC.h"
Packit Service 50c9f2
Packit Service 50c9f2
Packit Service 50c9f2
namespace vhdl {
Packit Service 50c9f2
namespace parser {
Packit Service 50c9f2
Packit Service 50c9f2
/**
Packit Service 50c9f2
 * Describes the input token stream.
Packit Service 50c9f2
 */
Packit Service 50c9f2
Packit Service 50c9f2
class Token
Packit Service 50c9f2
{
Packit Service 50c9f2
 public:
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * An integer that describes the kind of this token.  This numbering
Packit Service 50c9f2
   * system is determined by JavaCCParser, and a table of these numbers is
Packit Service 50c9f2
   * stored in the file ...Constants.java.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  int kind;
Packit Service 50c9f2
Packit Service 50c9f2
  /** The line number of the first character of this Token. */
Packit Service 50c9f2
  int beginLine;
Packit Service 50c9f2
  /** The column number of the first character of this Token. */
Packit Service 50c9f2
  int beginColumn;
Packit Service 50c9f2
  /** The line number of the last character of this Token. */
Packit Service 50c9f2
  int endLine;
Packit Service 50c9f2
  /** The column number of the last character of this Token. */
Packit Service 50c9f2
  int endColumn;
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * The string image of the token.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  JAVACC_STRING_TYPE image;
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * A reference to the next regular (non-special) token from the input
Packit Service 50c9f2
   * stream.  If this is the last token from the input stream, or if the
Packit Service 50c9f2
   * token manager has not read tokens beyond this one, this field is
Packit Service 50c9f2
   * set to NULL.  This is true only if this token is also a regular
Packit Service 50c9f2
   * token.  Otherwise, see below for a description of the contents of
Packit Service 50c9f2
   * this field.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  Token *next;
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * This field is used to access special tokens that occur prior to this
Packit Service 50c9f2
   * token, but after the immediately preceding regular (non-special) token.
Packit Service 50c9f2
   * If there are no such special tokens, this field is set to NULL.
Packit Service 50c9f2
   * When there are more than one such special token, this field refers
Packit Service 50c9f2
   * to the last of these special tokens, which in turn refers to the next
Packit Service 50c9f2
   * previous special token through its specialToken field, and so on
Packit Service 50c9f2
   * until the first special token (whose specialToke_ field is NULL).
Packit Service 50c9f2
   * The next fields of special tokens refer to other special tokens that
Packit Service 50c9f2
   * immediately follow it (without an intervening regular token).  If there
Packit Service 50c9f2
   * is no such token, this field is NULL.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  Token *specialToken;
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * An optional attribute value of the Token.
Packit Service 50c9f2
   * Tokens which are not used as syntactic sugar will often contain
Packit Service 50c9f2
   * meaningful values that will be used later on by the compiler or
Packit Service 50c9f2
   * interpreter. This attribute value is often different from the image.
Packit Service 50c9f2
   * Any subclass of Token that actually wants to return a non-NULL value can
Packit Service 50c9f2
   * override this method as appropriate.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  void * getValue();
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * No-argument constructor
Packit Service 50c9f2
   */
Packit Service 50c9f2
  Token();
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * Constructs a new token for the specified Image.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  Token(int kind);
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * Constructs a new token for the specified Image and Kind.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  Token(int kind, JAVACC_STRING_TYPE image);
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * Returns the image.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  JAVACC_STRING_TYPE toString();
Packit Service 50c9f2
Packit Service 50c9f2
  public: virtual ~Token();
Packit Service 50c9f2
Packit Service 50c9f2
  /**
Packit Service 50c9f2
   * Returns a new Token void *, by default. However, if you want, you
Packit Service 50c9f2
   * can create and return subclass objects based on the value of ofKind.
Packit Service 50c9f2
   * Simply add the cases to the switch for all those special cases.
Packit Service 50c9f2
   * For example, if you have a subclass of Token called IDToken that
Packit Service 50c9f2
   * you want to create if ofKind is ID, simply add something like :
Packit Service 50c9f2
   *
Packit Service 50c9f2
   *    case MyParserConstants.ID : return new IDToken(ofKind, image);
Packit Service 50c9f2
   *
Packit Service 50c9f2
   * to the following switch statement. Then you can cast matchedToken
Packit Service 50c9f2
   * variable to the appropriate type and use sit in your lexical actions.
Packit Service 50c9f2
   */
Packit Service 50c9f2
  static Token *newToken(int ofKind, JAVACC_STRING_TYPE image);
Packit Service 50c9f2
Packit Service 50c9f2
  static Token *newToken(int ofKind);
Packit Service 50c9f2
};
Packit Service 50c9f2
Packit Service 50c9f2
}
Packit Service 50c9f2
}
Packit Service 50c9f2
#endif
Packit Service 50c9f2
/* JavaCC - OriginalChecksum=2f5eb1c937adc983dfa2008c4fe383a7 (do not edit this line) */