public void ConstructDependency()
 {
     foreach (string filepath in files_)
     {
         Semi semi = new Semi();
         if (!semi.open(filepath))
         {
             Console.WriteLine("Cannot open file {0}", filepath);
             continue;
         }
         string filename = TypeAnalyzer.Filename(filepath);
         //Console.WriteLine(" - Processing file {0}", filename);
         BuildDependencyAnalyzer depAnalyzer = new BuildDependencyAnalyzer(semi, filename);
         Parser depParser = depAnalyzer.build();
         //Console.WriteLine("Size of graph: {0}", graph_.Count);
         try
         {
             while (semi.get().Count > 0)
             {
                 depParser.parse(semi);
             }
         }
         catch (Exception ex)
         {
             Console.Write("\n\n  {0}\n", ex.Message);
         }
     }
 }
예제 #2
0
 //-----------------------<Construct dependency information and deposit in repository>-----------
 public void ConstructDependency(string path)
 {
     AddFile(path);
     foreach (string filepath in files_)
     {
         ITokenCollection semi = Factory.create();
         if (!semi.open(filepath))
         {
             Console.WriteLine("Cannot open file {0}", filepath);
             continue;
         }
         string filename = Filename(filepath);
         Console.WriteLine("Constructed filename: {0}", filename);
         BuildDependencyAnalyzer depAnalyzer = new BuildDependencyAnalyzer(semi, filename);
         Parser depParser = depAnalyzer.build();
         try
         {
             while (semi.get().Count > 0)
             {
                 depParser.parse(semi);
             }
         }
         catch (Exception ex)
         {
             Console.Write("\n\n  {0}\n", ex.Message);
         }
     }
 }