public int indexOfType(Lexer.ITokenCollection semi) { int indexCL; semi.find("class", out indexCL); int indexIF; semi.find("interface", out indexIF); int indexST; semi.find("struct", out indexST); int indexEN; semi.find("enum", out indexEN); int indexDE; semi.find("delegate", out indexDE); int index = Math.Max(indexCL, indexIF); index = Math.Max(index, indexST); index = Math.Max(index, indexEN); index = Math.Max(index, indexDE); return(index); }
public void doActions(Lexer.ITokenCollection semi) { foreach (IAction action in actions) { action.doAction(semi); } }
//To perform Dependency analysis if the input type is present in TypeTable public void analyze(Lexer.ITokenCollection semi, String filename) { String DependendFile = null; String AliasRFile = null; while (semi.get().Count > 0) { foreach (string objvalue in semi) { if (typetable.ContainsKey(objvalue))// If type present in TypeTable { DependendFile = DepAnalysis.dependend(objvalue); } else if (aliastable.ContainsKey(objvalue))//If type present in AliasTable { AliasRFile = DepAnalysis.Aliasdepend(objvalue); } } if (DependendFile != null) { i = i + 1; DisplayDep(DependendFile, filename); if (AliasRFile != null & AliasRFile != DependendFile) { i = i + 1; DisplayDep(AliasRFile, filename); } ReceivedFile = null; ProFile = null; } } }
public virtual void display(Lexer.ITokenCollection semi) { if (displaySemi) { for (int i = 0; i < semi.size(); ++i) { Console.Write("{0} ", semi[i]); } } }
//To create a Using Type list public void HoldUsingValue(Lexer.ITokenCollection semi) { Type retnvalue; DetectUsing du = new DetectUsing(); retnvalue = du.testusing(semi); if (retnvalue != null) { UsingList.Add(retnvalue); } }
public abstract void doAction(Lexer.ITokenCollection semi);
abstract public bool test(Lexer.ITokenCollection semi);
public BuildCodeAnalyzer(Lexer.ITokenCollection semi) { repo.semi = semi; }