// match the toker and Typetable 
 public void match(string[] args)
 {
     tt = new TypeTable();
     tt = tt.getTypeTable(args);
     depentable = new Dictionary<String, List<String>>();
     foreach (string file in args)
     {
         toker = new CToker();
         if (!toker.openFile(file as string))
         {
             Console.Write("\n  Can't open {0}\n\n", args[0]);
             return;
         }
         String tok = "";
         while ( (tok=toker.getTok()) != "")
         {
             if (tok != "\n")
             {
                 if (tt.table.ContainsKey(tok))
                 {
                     foreach (var ele in tt.table)
                     {
                         if (ele.Key == tok)
                         {
                             foreach (var item in ele.Value)
                             {
                                 if (item.file == Path.GetFileName(file) )
                                 {
                                     add(item.file,item.file);
           
                                 }
                                 else
                                     add(Path.GetFileName(file), item.file);
                             }
                         }
                     }
                 }
             }
         }
         toker.close();
     }
 }
Example #2
0
        //----< close file stream >------------------------------------------

        public void close()
        {
            toker.close();
        }