syntax
Class Scope

java.lang.Object
  extended bysyntax.Scope

public class Scope
extends java.lang.Object


Field Summary
 boolean isANameSpaceScope
          Indicates whether this is a namespace scope or not.
 java.lang.String scopeName
          Name of the scope (set only for class/function scopes).
 
Constructor Summary
Scope(Scope p, boolean nameSpaceScope)
          Creates an unnamed scope (like for compound statements).
Scope(java.lang.String name, boolean isType, Scope p, boolean nameSpaceScope)
          Creates a scope object with a given name.
 
Method Summary
 void AddNamespace(Scope sc)
          Add a namespace.
 Scope GetScope(java.lang.String name)
           
 boolean IsTypeName(java.lang.String name)
          Checks if a given name is the name of a type in this scope.
 boolean IsVarName(java.lang.String name)
          Checks if a given name is the name of a variable in this scope.
 void PutTypeName(java.lang.String name)
          Inserts a name into the table to say that it is the name of a type.
 void PutTypeName(java.lang.String name, Scope sc)
          A type with a scope (class/struct/union).
 void PutVarName(java.lang.String name)
          Inserts a name into the table to say that it is the name of a variable and therefore it is NOT the name of a type, thus overriding any outer type definition with the same name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeName

public java.lang.String scopeName
Name of the scope (set only for class/function scopes). Last change: M 19 Oct 97 4:21 pm


isANameSpaceScope

public boolean isANameSpaceScope
Indicates whether this is a namespace scope or not.

Constructor Detail

Scope

public Scope(java.lang.String name,
             boolean isType,
             Scope p,
             boolean nameSpaceScope)
Creates a scope object with a given name.


Scope

public Scope(Scope p,
             boolean nameSpaceScope)
Creates an unnamed scope (like for compound statements).

Method Detail

PutTypeName

public void PutTypeName(java.lang.String name)
Inserts a name into the table to say that it is the name of a type. There was a bug. The simple type declarartion override the existing type definition. Correction made: 11/20/97 by Ferenc Magyar


PutVarName

public void PutVarName(java.lang.String name)
Inserts a name into the table to say that it is the name of a variable and therefore it is NOT the name of a type, thus overriding any outer type definition with the same name.


PutTypeName

public void PutTypeName(java.lang.String name,
                        Scope sc)
A type with a scope (class/struct/union).


AddNamespace

public void AddNamespace(Scope sc)
Add a namespace.


IsTypeName

public boolean IsTypeName(java.lang.String name)
Checks if a given name is the name of a type in this scope.


IsVarName

public boolean IsVarName(java.lang.String name)
Checks if a given name is the name of a variable in this scope.


GetScope

public Scope GetScope(java.lang.String name)