marf.nlp.Parsing
Class SymTabEntry

java.lang.Object
  |
  +--marf.nlp.Parsing.SymTabEntry
Direct Known Subclasses:
ClassSymTabEntry, FuncSymTabEntry, VarSymTabEntry

public class SymTabEntry
extends java.lang.Object

This class denotes one entry per user-defined symbol in the Sumbol Table. $Id: SymTabEntry.java,v 1.6 2005/06/16 19:58:57 mokhov Exp $

Since:
0.3.0
Version:
$Revision: 1.6 $
Author:
Serguei Mokhov

Field Summary
static int CLASS
          Class Entry Type.
protected  marf.nlp.Parsing.SymDataType DataType
          Data type of this symbols (e.g.
protected  boolean Declared
          A flag inidcating that the symbol was (true) or was not (false) resolved.
 int EntryType
          Current Entry type.
static int FUNCTION
          Function entry type.
protected  java.util.Vector GenCodeLocations
          Locations in generated code (point, x - base, y - offset).
protected  int ID
          Numeric ID of the entry.
protected  marf.nlp.Parsing.SymbolTable LocalSymTab
          Local scope symbol table (if applicable).
protected  java.util.Vector LocationsList
          List of locations where the give ID appears in the source code.
protected  boolean MultilplyDefined
          A flag inidcating that the symbol was (true) or was not (false) resolved.
protected  java.lang.String Name
           
 boolean Reserved
           
protected  marf.nlp.Parsing.Token UID
          Entry symbol, encapsulated as Token.
static int VARIABLE
          Variable entry type.
 
Constructor Summary
SymTabEntry()
           
SymTabEntry(java.lang.String pstrName)
           
SymTabEntry(marf.nlp.Parsing.Token poUID)
           
SymTabEntry(marf.nlp.Parsing.Token poUID, boolean pbDeclared)
           
SymTabEntry(marf.nlp.Parsing.Token poUID, marf.nlp.Parsing.SymDataType poSymDataType)
           
 
Method Summary
 void addLocation(java.awt.Point poPoisition)
          Adds location to every occurrence of a token in the source code.
 marf.nlp.Parsing.SymDataType getDataType()
          Get data type.
 int getID()
           
 marf.nlp.Parsing.SymbolTable getLocalSymTab()
           
 java.util.Vector getLocationsList()
          Get list of occurrences of this token entry.
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 marf.nlp.Parsing.Token getUID()
          Returns UID.
 boolean isDeclared()
          Determines if the Resolved property is true.
 boolean isMultiplyDefined()
           
 void setDeclared(boolean pbDeclared)
          Sets the value of the Declared property.
 void setID(int piID)
           
 void setMultiplyDefined()
           
 void setMultiplyDefined(boolean pbFlag)
          Sets the value of the MultilplyDefined property.
 void setUID(marf.nlp.Parsing.Token poToken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

protected int ID
Numeric ID of the entry. Not really used.

Since:
September 2001

Declared

protected boolean Declared
A flag inidcating that the symbol was (true) or was not (false) resolved.

Since:
September 2001

Reserved

public boolean Reserved

MultilplyDefined

protected boolean MultilplyDefined
A flag inidcating that the symbol was (true) or was not (false) resolved.

Since:
Decemeber 21, 2001

UID

protected marf.nlp.Parsing.Token UID
Entry symbol, encapsulated as Token.


DataType

protected marf.nlp.Parsing.SymDataType DataType
Data type of this symbols (e.g. integer, real, class).

Since:
September 2001

LocationsList

protected java.util.Vector LocationsList
List of locations where the give ID appears in the source code.

Since:
September 2001

GenCodeLocations

protected java.util.Vector GenCodeLocations
Locations in generated code (point, x - base, y - offset).


LocalSymTab

protected marf.nlp.Parsing.SymbolTable LocalSymTab
Local scope symbol table (if applicable).


EntryType

public int EntryType
Current Entry type.


VARIABLE

public static final int VARIABLE
Variable entry type.

See Also:
Constant Field Values

FUNCTION

public static final int FUNCTION
Function entry type.

See Also:
Constant Field Values

CLASS

public static final int CLASS
Class Entry Type.

See Also:
Constant Field Values

Name

protected java.lang.String Name
Constructor Detail

SymTabEntry

public SymTabEntry()

SymTabEntry

public SymTabEntry(java.lang.String pstrName)

SymTabEntry

public SymTabEntry(marf.nlp.Parsing.Token poUID)

SymTabEntry

public SymTabEntry(marf.nlp.Parsing.Token poUID,
                   boolean pbDeclared)

SymTabEntry

public SymTabEntry(marf.nlp.Parsing.Token poUID,
                   marf.nlp.Parsing.SymDataType poSymDataType)
Method Detail

getDataType

public marf.nlp.Parsing.SymDataType getDataType()
Get data type.


addLocation

public void addLocation(java.awt.Point poPoisition)
Adds location to every occurrence of a token in the source code.


getLocationsList

public java.util.Vector getLocationsList()
Get list of occurrences of this token entry.


getUID

public marf.nlp.Parsing.Token getUID()
Returns UID.

Returns:
Token

setUID

public void setUID(marf.nlp.Parsing.Token poToken)

isDeclared

public boolean isDeclared()
Determines if the Resolved property is true.

Returns:
true if the Resolved property is true

setDeclared

public void setDeclared(boolean pbDeclared)
Sets the value of the Declared property.

Parameters:
pbDeclared - the new value of the Declared property

isMultiplyDefined

public boolean isMultiplyDefined()

setMultiplyDefined

public void setMultiplyDefined(boolean pbFlag)
Sets the value of the MultilplyDefined property.

Parameters:
pbFlag - the new value of the MultilplyDefined property

setMultiplyDefined

public void setMultiplyDefined()

getLocalSymTab

public marf.nlp.Parsing.SymbolTable getLocalSymTab()

getID

public int getID()

setID

public void setID(int piID)

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string