using System; // Z# Symbol Table Scopes public class Scope { public Scope outer; // reference to enclosing scope public Symbol locals; // symbol table of this scope public int nArgs; // # of arguments in this scope (for address asignment) public int nLocs; // # of local variables in this scope (for address asignment) public void Dump() { if (locals == null) { Console.WriteLine("No nested symbols."); return; } Console.WriteLine("Nested symbols:"); Symbol cur = locals; while (cur != null) { Console.WriteLine(cur.ToString()); cur = cur.next; } } }