//============================================================================== // tribble/io/SymbolI.java //------------------------------------------------------------------------------ package tribble.io; // System imports import java.lang.Exception; import java.lang.String; // Local imports // (None) /******************************************************************************* * Generic symbol interface (i.e., an entry in a symbol table). * *
* This interface is used to implement any kind of symbol table entry, such as
* one in a symbol table tree resulting from the parsing of a source program.
*
* @version $Revision: 1.1 $ $Date: 2001/07/10 20:30:28 $
* @since 2001-07-10
* @author
* David R. Tribble,
* david@tribble.com
*
* Copyright
* ©2001-2002 by David R. Tribble, all rights reserved.
*
* Permission is granted to freely use and distribute this source code
* provided that the original copyright and authorship notices remain
* intact.
*
* @see SymbolTableI
*/
public interface SymbolI
{
// Identification
/** Revision information. */
static final String REV =
"@(#)tribble/io/SymbolI.java $Revision: 1.1 $ $Date: 2001/07/10 20:30:28 $\n";
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Public methods
/***************************************************************************
* Establishes the name of this symbol.
*
* @param id
* The name of this symbol.
*
* @since 1.1, 2001-07-10
*/
public void setName(String id);
/***************************************************************************
* Retrieves the name of this symbol.
*
* @return
* The name of this symbol, or null if one has not been established yet.
*
* @since 1.1, 2001-07-10
*/
public void getName();
/***************************************************************************
* Establishes the serial number of this symbol.
*
* @param n
* The serial number of this symbol, which should be unique within the
* symbol table containing this symbol.
*
* @since 1.1, 2001-07-10
*/
public void setSerialNum(int n);
/***************************************************************************
* Retrieves the serial number of this symbol.
*
* @return
* The serial number of this symbol.
*
* @since 1.1, 2001-07-10
*/
public int getSerialNum();
/***************************************************************************
* Establishes the data type of this symbol.
*
* @param type
* The data type of this symbol.
*
* @since 1.1, 2001-07-10
*/
public void setType(int type);
/***************************************************************************
* Retrieves the data type of this symbol.
*
* @return
* The data type of this symbol.
*
* @since 1.1, 2001-07-10
*/
public int getType();
}
// End SymbolI.java