public coupleComp compare(cppFile f1, cppFile f2, params int[] x) { coupleComp c = new coupleComp(); c.f1 = f1; c.f2 = f2; c.file1 = f1.name; c.file2 = f2.name; foreach (int d in x) { detrminMethod(c, d); } return(c); }
public static List <ComparisonTable> CompareCppFiles(cppFile file1, cppFile file2) { List <ComparisonTable> CT = new List <ComparisonTable>(); CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.keyWords, file2.result.keyWords)).ToList(); CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.operations, file2.result.operations)).ToList(); CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.values, file2.result.values)).ToList(); CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.specialChars, file2.result.specialChars)).ToList(); //CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.pointrs, file2.result.pointrs)).ToList(); //CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.arrays, file2.result.arrays)).ToList(); //CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.vars, file2.result.vars)).ToList(); //CT = CT.Concat(CompareScopesAddToComparisonTable(file1.result.functionCalls, file2.result.functionCalls)).ToList(); foreach (ComparisonTable CTRow in CT) { CTRow.SetFileNames(file1.name, file2.name); } return(CT); }
public function(string codee, int containingScopeId, ref List <token> tokens, List <identifier> parameters, string datatype, string funcName, cppFile cppfile) { this.ScopeId = code.idno++; this.containingScopeId = containingScopeId; this.holeCodeTokens = cppfile.holeCodeTokens; this.funcBody = codee; this.tokens = tokens; this.parameters = parameters; this.funcDataType = datatype; this.name = funcName; for (int j = 0; j < tokens.Count(); j++) { if ((tokens[j].getLexeme() == "return") && (tokens[j + 1].getLexeme() == funcName)) { this.recursive = true; } } }