//----< Test Stub >-------------------------------------------------- #if (TEST_PARSER) static void Main(string[] args) { List <List <Elem> > allTables = new List <List <Elem> >(); Console.Write("\n Demonstrating Parser"); Console.Write("\n ======================\n"); ShowCommandLine(args); List <string> files = TestParser.ProcessCommandline(args); foreach (string file in files) { Console.Write("\n Processing file {0}\n", System.IO.Path.GetFileName(file)); ITokenCollection semi = Factory.create(); //semi.displayNewLines = false; if (!semi.open(file as string)) { Console.Write("\n Can't open {0}\n\n", args[0]); return; } Console.Write("\n Type and Function Analysis"); Console.Write("\n ----------------------------"); BuildCodeAnalyzer builder = new BuildCodeAnalyzer(semi, file); Parser parser = builder.build(); try { while (semi.get().Count > 0) { parser.parse(semi); } } catch (Exception ex) { Console.Write("\n\n {0}\n", ex.Message); } Repository rep = Repository.getInstance(); List <Elem> table = rep.locations; allTables.Add(table); Console.Write("\n"); semi.close(); } Display.showMetricsNamespace(allTables); Display.showMetricsClass(allTables); Display.showMetricsFunction(allTables); Display.showMetricsAlias(allTables); Display.showMetricsEnum(allTables); Display.showMetricsStruct(allTables); Display.showMetricsDelegate(allTables); Display.showMetricsUsing(allTables); Display.showMetricsInterface(allTables); Console.Write("\n\n"); }
static public List <string> showTypetable(List <List <Elem> > tablelist) { List <string> generatetypetable = new List <string>(); showMetricsNamespace(tablelist); Display.showMetricsUsing(tablelist); Display.showMetricsInterface(tablelist); Display.showMetricsClass(tablelist); Display.showMetricsDelegate(tablelist); Display.showMetricsStruct(tablelist); Display.showMetricsEnum(tablelist); Display.showMetricsFunction(tablelist); generatetypetable = showMetricsAlias(tablelist); return(generatetypetable); }
public static void displayRequirement1(List <List <Elem> > listOfTables) { Console.WriteLine(); //Console.WriteLine("<======================== Requirement 5: =========================> \n"); Console.WriteLine("Type Table: "); Display.showMetricsUsing(listOfTables); Display.showMetricsNamespace(listOfTables); Display.showMetricsInterface(listOfTables); Display.showMetricsClass(listOfTables); Display.showMetricsFunction(listOfTables); Display.showMetricsEnum(listOfTables); Display.showMetricsStruct(listOfTables); Display.showMetricsDelegate(listOfTables); Display.showMetricsAlias(listOfTables); Console.Write("\n\n"); }
static void display(List <List <Elem> > allTables) { Console.WriteLine("Displaying the type table for all the files"); Console.WriteLine("--------------------------------------------------------------------"); Display.showMetricsNamespace(allTables); Display.showMetricsClass(allTables); Display.showMetricsFunction(allTables); Display.showMetricsAlias(allTables); Display.showMetricsEnum(allTables); Display.showMetricsStruct(allTables); Display.showMetricsDelegate(allTables); Display.showMetricsUsing(allTables); Display.showMetricsInterface(allTables); Console.Write("\n\n"); return; }
//-------------------<Display Type Table>----------------------------- static void DisplayRequirement1(List <List <Elem> > tableList) { Console.WriteLine("\nRequirement 5: TypeTable & Dependency Analysis"); Console.WriteLine("==============================================="); Console.WriteLine("Type Table is as below:"); Console.WriteLine("----------------------"); Display.showMetricsNamespace(tableList); Display.showMetricsUsing(tableList); Display.showMetricsAlias(tableList); Display.showMetricsInterface(tableList); Display.showMetricsEnum(tableList); Display.showMetricsStruct(tableList); Display.showMetricsDelegate(tableList); Display.showMetricsClass(tableList); Display.showMetricsFunction(tableList); }
//----------------*Displays Requirement 5*-------------------// public static List <string> displayRequirement1(List <List <Elem> > allTables) { // Console.WriteLine("Demonstrating Requirement 5:"); //Console.WriteLine("Displaying the type table for all the files"); //Console.WriteLine("--------------------------------------------------------------------"); Display.showMetricsNamespace(allTables); Display.showMetricsInterface(allTables); Display.showMetricsAlias(allTables); Display.showMetricsClass(allTables); Display.showMetricsFunction(allTables); Display.showMetricsStruct(allTables); Display.showMetricsEnum(allTables); Display.showMetricsUsing(allTables); tableType = Display.showMetricsDelegate(allTables); //Console.Write("\n\n"); return(tableType); }
static void Main(string[] args) { Console.WriteLine("Demonstrating Test Stub for Type Analyser"); Console.WriteLine("========================================="); Console.WriteLine("The Type Table is as below:"); List <string> files = ProcessCommandline(args); List <List <Elem> > tableList = GenerateTypeTable.TypeTableGenerator(files); Display.showMetricsNamespace(tableList); Display.showMetricsClass(tableList); Display.showMetricsFunction(tableList); Display.showMetricsAlias(tableList); Display.showMetricsEnum(tableList); Display.showMetricsStruct(tableList); Display.showMetricsDelegate(tableList); Display.showMetricsUsing(tableList); Console.Read(); }