예제 #1
0
        public BSYMMGR()
        {
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal);

            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(NameManager.Lookup(""), null);

            ////////////////////////////////////////////////////////////////////////////////
            // Build the data structures needed to make FPreLoad fast. Make sure the
            // namespaces are created. Compute and sort hashes of the NamespaceSymbol * value and type
            // name (sans arity indicator).

            for (int i = 0; i < (int)PredefinedType.PT_COUNT; ++i)
            {
                NamespaceSymbol ns    = GetRootNS();
                string          name  = PredefinedTypeFacts.GetName((PredefinedType)i);
                int             start = 0;
                while (start < name.Length)
                {
                    int iDot = name.IndexOf('.', start);
                    if (iDot == -1)
                    {
                        break;
                    }
                    string sub = (iDot > start) ? name.Substring(start, iDot - start) : name.Substring(start);
                    Name   nm  = NameManager.Add(sub);
                    ns     = LookupGlobalSymCore(nm, ns, symbmask_t.MASK_NamespaceSymbol) as NamespaceSymbol ?? _symFactory.CreateNamespace(nm, ns);
                    start += sub.Length + 1;
                }
            }
        }
예제 #2
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, bool loadNames)
        {
            m_pSymTable = symtable;

            if (loadNames)
            {
                m_pMissingNameNode = NameManager.GetPredefinedName(PredefinedName.PN_MISSING);
                m_pMissingNameSym  = NameManager.GetPredefinedName(PredefinedName.PN_MISSINGSYM);
            }
        }
예제 #3
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, NameManager namemgr)
        {
            m_pSymTable = symtable;

            if (namemgr != null)
            {
                m_pMissingNameNode = namemgr.GetPredefName(PredefinedName.PN_MISSING);
                m_pMissingNameSym  = namemgr.GetPredefName(PredefinedName.PN_MISSINGSYM);
            }
        }
예제 #4
0
        public BSYMMGR(NameManager nameMgr)
        {
            this.m_nameTable = nameMgr;
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal);
            _miscSymFactory  = new MiscSymFactory(this.tableGlobal);

            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(m_nameTable.Lookup(""), null);
            GetNsAid(_rootNS);
        }
예제 #5
0
        public BSYMMGR(NameManager nameMgr, TypeManager typeManager)
        {
            this.m_nameTable = nameMgr;
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal, this.m_nameTable);
            _miscSymFactory  = new MiscSymFactory(this.tableGlobal);

            this.ssetAssembly = new List <AidContainer>();

            _infileUnres          = new InputFile();
            _infileUnres.isSource = false;
            _infileUnres.SetAssemblyID(KAID.kaidUnresolved);

            this.ssetAssembly.Add(new AidContainer(_infileUnres));
            this.bsetGlobalAssemblies = new HashSet <KAID>();
            this.bsetGlobalAssemblies.Add(KAID.kaidThisAssembly);
            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(m_nameTable.Add(""), null);
            GetNsAid(_rootNS, KAID.kaidGlobal);
        }
예제 #6
0
        /////////////////////////////////////////////////////////////////////////////////

        internal SymbolTable(
            SYMTBL symTable,
            SymFactory symFactory,
            NameManager nameManager,
            TypeManager typeManager,
            BSYMMGR bsymmgr,
            CSemanticChecker semanticChecker,

            InputFile infile)
        {
            _symbolTable = symTable;
            _symFactory = symFactory;
            _nameManager = nameManager;
            _typeManager = typeManager;
            _bsymmgr = bsymmgr;
            _semanticChecker = semanticChecker;

            _infile = infile;

            ClearCache();
        }
예제 #7
0
 public SymFactory(
     SYMTBL symtable,
     NameManager namemgr) :
     base(symtable, namemgr)
 {
 }
예제 #8
0
        // Constructor.

        public MiscSymFactory(SYMTBL symtable)
            : base(symtable)
        {
        }
예제 #9
0
 public SymFactory(
     SYMTBL symtable,
     NameManager namemgr) :
     base(symtable, namemgr)
 {
 }
예제 #10
0
 public SymFactory(SYMTBL symtable)
 {
     _symbolTable = symtable;
 }
예제 #11
0
 public SymFactory(SYMTBL symtable) :
     base(symtable, true)
 {
 }
예제 #12
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, NameManager namemgr)
        {
            m_pSymTable = symtable;

            if (namemgr != null)
            {
                m_pMissingNameNode = namemgr.GetPredefName(PredefinedName.PN_MISSING);
                m_pMissingNameSym = namemgr.GetPredefName(PredefinedName.PN_MISSINGSYM);
            }
        }
예제 #13
0
 // This class should never be created on its own.
 protected SymFactoryBase(SYMTBL symtable)
 {
     m_pSymTable = symtable;
 }
예제 #14
0
        // Constructor.

        public MiscSymFactory(SYMTBL symtable)
            : base(symtable, null)
        {
        }