package natlab;

import java.util.*;

public class SymbolTableFunctionEntry
{
    private String name;
    private SymbolTableScope localSymbols;
    private HashMap< String, SymbolTableFunctionEntry > nestedFunctions;
    private HashMap< String, SymbolTableFunctionEntry > localFunctions;

    //TODO-JD: Add some input output type info

    SymbolTableFunctionEntry( String n )
    {
        name = n;
        localSymbols = new SymbolTableScope();
        nestedFunctions = new HashMap< String, SymbolTableFunctionEntry >();
        localFunctions = new HashMap< String, SymbolTableFunctionEntry >();
    }
    SymbolTableFunctionEntry( String n, HashMap< String, SymbolTableFunctionEntry > lf )
    {
        name = n;
        localSymbols = new SymbolTableScope();
        nestedFunctions = new HashMap< String, SymbolTableFunctionEntry >();
        localFunctions = lf;
    }
    SymbolTableFunctionEntry( String n, SymbolTableScope st )
    {
        name = n;
        localSymbols = st;
        nestedFunctions = new HashMap< String, SymbolTableFunctionEntry >();
        localFunctions = new HashMap< String, SymbolTableFunctionEntry >();
    }
    SymbolTableFunctionEntry( String n, SymbolTableScope st, HashMap< String, SymbolTableFunctionEntry > lf )
    {
        name = n;
        localSymbols = st;
        nestedFunctions = new HashMap< String, SymbolTableFunctionEntry >();
        localFunctions = lf;
    }

}
@@ -283,16 +283,86 @@
 nctions;
+%0A    private HashMap%3C String, SymbolTableFunctionEntry %3E parentLocals;
 %0A%0A    //
@@ -660,32 +660,61 @@
 ctionEntry %3E();%0A
+        parentLocals = null;%0A
     %7D%0A    Symbol
@@ -965,24 +965,53 @@
 tions = lf;%0A
+        parentLocals = null;%0A
     %7D%0A    Sy
@@ -1266,24 +1266,53 @@
 nEntry %3E();%0A
+        parentLocals = null;%0A
     %7D%0A    Sy
@@ -1576,12 +1576,2374 @@
 lf;%0A    
-%7D
+    parentLocals = null;%0A    %7D%0A%0A%0A    /*SymbolTableFunctionEntry( String n, HashMap%3C String, SymbolTableFunctionEntry %3E pl )%0A    %7B%0A        name = n;%0A        localSymbols = new SymbolTableScope();%0A        nestedFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        localFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        parentLocals = pl;%0A        %7D*/%0A    SymbolTableFunctionEntry( String n, HashMap%3C String, SymbolTableFunctionEntry %3E lf, HashMap%3C String, SymbolTableFunctionEntry %3E pl )%0A    %7B%0A        name = n;%0A        localSymbols = new SymbolTableScope();%0A        nestedFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        localFunctions = lf;%0A        parentLocals = pl;%0A    %7D%0A    /*SymbolTableFunctionEntry( String n, SymbolTableScope st, HashMap%3C String, SymbolTableFunctionEntry %3E pl )%0A    %7B%0A        name = n;%0A        localSymbols = st;%0A        nestedFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        localFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        parentLocals = pl;%0A        %7D*/%0A    SymbolTableFunctionEntry( String n, SymbolTableScope st, %0A                              HashMap%3C String, SymbolTableFunctionEntry %3E lf, %0A                              HashMap%3C String, SymbolTableFunctionEntry %3E pl )%0A    %7B%0A        name = n;%0A        localSymbols = st;%0A        nestedFunctions = new HashMap%3C String, SymbolTableFunctionEntry %3E();%0A        localFunctions = lf;%0A        parentLocals = pl;%0A    %7D%0A%0A%0A    public String getName()%7B return name; %7D%0A    public SymbolTableScope getLocalsymbols()%7B return localSymbols; %7D%0A    public HashMap%3C String, SymbolTableFunctionEntry %3E getNestedfunctions()%7B return nestedFunctions; %7D%0A    public HashMap%3C String, SymbolTableFunctionEntry %3E getLocalfunctions()%7B return localFunctions; %7D%0A    public HashMap%3C String, SymbolTableFunctionEntry %3E getParentlocals()%7B return parentLocals; %7D%0A%0A    public void setName( String n )%7B name = n; %7D%0A    public void setLocalSymbols( SymbolTableScope ls )%7B localSymbols = ls; %7D%0A    public void setNestedFunctions( HashMap%3C String, SymbolTableFunctionEntry %3E  nf)%7B nestedFunctions = nf; %7D%0A    public void setLocalFunctions( HashMap%3C String, SymbolTableFunctionEntry %3E lf)%7B localFunctions = lf; %7D%0A    public void setParentLocals( HashMap%3C String, SymbolTableFunctionEntry %3E pl)%7B parentLocals = pl; %7D%0A
 %0A%0A%7D

Add new constructors and field for proper function scope hierarchy