CommonPrimitiveCToken.java
package edu.udel.cis.vsl.abc.token.common;
public class CommonPrimitiveCToken {
// /**
// * Eclipse made me do it.
// */
// private static final long serialVersionUID = -5773484495225323826L;
//
//
// /**
// * Record of original of token through macro expansions. A null value is
// * possible and indicates the "trivial" expansion history. Note that the
// * getExpansionHistory method, however, will never return null, since it
// * instead generates the trivial history on the fly.
// */
// private ExpansionHistory expansionHistory;
//
// /**
// * Creates new instance by copying fields from old one. The two histories
// * are set to the given arguments. Both must be non-null.
// *
// * @param token
// * any kind of Token
// */
// public CommonPrimitiveCToken(Token token,
// ExpansionHistory expansionHistory, IncludeHistory includeHistory) {
// super(token);
// assert includeHistory != null;
// assert expansionHistory != null;
// this.includeHistory = includeHistory;
// this.expansionHistory = expansionHistory;
// }
//
// /**
// * Makes a new CToken with trivial expansion history. The include history
// * must be non-null.
// *
// * @param token
// * any instance of Token whose fields are used to initialize the
// * new token's fields. The expansion and include histories of the
// * given token, if present, are ignored.
// * @param includeHistory
// * the include history to be used for the new token
// */
// public CommonPrimitiveCToken(Token token, IncludeHistory includeHistory)
// {
// super(token);
// assert includeHistory != null;
// this.includeHistory = includeHistory;
// this.expansionHistory = null;
// }
//
//
// /**
// * Returns the expansion history of this token, which records the origin
// of
// * the token through a series of macro expansions.
// *
// * @return this token's macro expansion history
// */
// public ExpansionHistory getExpansionHistory() {
// if (expansionHistory != null)
// return expansionHistory;
// else
// // return "trivial" expansion history
// return new CommonExpansionHistory(this);
// }
//
// /**
// * Returns a string representation that is appropriate for reporting this
// * token and its source to the end user. It includes the text of the
// token,
// * source file, line and character index, history through macro expansion
// * and include directives.
// */
// @Override
// public String toString() {
// if (this.getType() == Token.EOF)
// return "EOF";
//
// String result;
//
// result = TokenUtils.quotedText(this);
// if (expansionHistory != null && !expansionHistory.isTrivial()) {
// result += expansionHistory.suffix();
// } else {
// result += " in " + TokenUtils.location(this);
// }
// if (includeHistory != null) {
// result += includeHistory.suffix();
// }
// return result;
// }
}