示例#1
0
        public DependencyPass.DependencyTracker GetDemoTracker2(ProtoCore.Core core)
        {
            Associative.Scanner s = new Associative.Scanner(@"..\..\Scripts\expr.ds");
            Associative.Parser p = new Associative.Parser(s, core);
            p.Parse();

            CodeBlockNode code = p.codeblock as CodeBlockNode;

            DependencyTracker tempTracker = new DependencyTracker();
            Dictionary<string, List<Node>> names = new Dictionary<string, List<Node>>();
            code.ConsolidateNames(ref(names));
            tempTracker.GenerateDependencyGraph(code.Body);
            return tempTracker;
        }
示例#2
0
        public DependencyPass.DependencyTracker GetDemoTracker2(ProtoCore.Core core)
        {
            Associative.Scanner s = new Associative.Scanner(@"..\..\Scripts\expr.ds");
            Associative.Parser  p = new Associative.Parser(s, core);
            p.Parse();

            CodeBlockNode code = p.codeblock as CodeBlockNode;

            DependencyTracker tempTracker           = new DependencyTracker();
            Dictionary <string, List <Node> > names = new Dictionary <string, List <Node> >();

            code.ConsolidateNames(ref (names));
            tempTracker.GenerateDependencyGraph(code.Body);
            return(tempTracker);
        }
示例#3
0
        public DependencyPass.DependencyTracker GetDemoTracker3(out ProtoCore.DSASM.SymbolTable symbols, string pathFilename, ProtoCore.Core core)
        {
            Associative.Scanner s = new Associative.Scanner(pathFilename);
            Associative.Parser p = new Associative.Parser(s, core); 
            p.Parse();
            CodeBlockNode code = p.codeblock as CodeBlockNode;
            symbols = code.symbols;
            
            DependencyTracker tempTracker = new DependencyTracker();

#if TEST_DIRECT
            foreach (Node node in code.Body)
            {
                tempTracker.AllNodes.Add(node);
            }
#else
            Dictionary<string, List<Node>> names = new Dictionary<string, List<Node>>();
            code.ConsolidateNames(ref(names));
            tempTracker.GenerateDependencyGraph(code.Body);
#endif
            return tempTracker;
        }
示例#4
0
        public DependencyPass.DependencyTracker GetDemoTracker3(out ProtoCore.DSASM.SymbolTable symbols, string pathFilename, ProtoCore.Core core)
        {
            Associative.Scanner s = new Associative.Scanner(pathFilename);
            Associative.Parser  p = new Associative.Parser(s, core);
            p.Parse();
            CodeBlockNode code = p.codeblock as CodeBlockNode;

            symbols = code.symbols;

            DependencyTracker tempTracker = new DependencyTracker();

#if TEST_DIRECT
            foreach (Node node in code.Body)
            {
                tempTracker.AllNodes.Add(node);
            }
#else
            Dictionary <string, List <Node> > names = new Dictionary <string, List <Node> >();
            code.ConsolidateNames(ref (names));
            tempTracker.GenerateDependencyGraph(code.Body);
#endif
            return(tempTracker);
        }