tribble.io
Interface SymbolI


public interface SymbolI

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.

Since:
2001-07-10
Version:
$Revision: 1.1 $ $Date: 2001/07/10 20:30:28 $
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 Also:
SymbolTableI

Field Summary
static java.lang.String REV
          Revision information.
 
Method Summary
 void getName()
          Retrieves the name of this symbol.
 int getSerialNum()
          Retrieves the serial number of this symbol.
 int getType()
          Retrieves the data type of this symbol.
 void setName(java.lang.String id)
          Establishes the name of this symbol.
 void setSerialNum(int n)
          Establishes the serial number of this symbol.
 void setType(int type)
          Establishes the data type of this symbol.
 

Field Detail

REV

static final java.lang.String REV
Revision information.

See Also:
Constant Field Values
Method Detail

setName

void setName(java.lang.String id)
Establishes the name of this symbol.

Parameters:
id - The name of this symbol.
Since:
1.1, 2001-07-10

getName

void getName()
Retrieves the name of this symbol.

Since:
1.1, 2001-07-10

setSerialNum

void setSerialNum(int n)
Establishes the serial number of this symbol.

Parameters:
n - The serial number of this symbol, which should be unique within the symbol table containing this symbol.
Since:
1.1, 2001-07-10

getSerialNum

int getSerialNum()
Retrieves the serial number of this symbol.

Returns:
The serial number of this symbol.
Since:
1.1, 2001-07-10

setType

void setType(int type)
Establishes the data type of this symbol.

Parameters:
type - The data type of this symbol.
Since:
1.1, 2001-07-10

getType

int getType()
Retrieves the data type of this symbol.

Returns:
The data type of this symbol.
Since:
1.1, 2001-07-10