public void parse(Lexer.ITokenCollection semi, string currentFile) { DetectUsing dusing = new DetectUsing(); if (dusing.test(semi)) { namespacesUsed.Add(semi[1]); } if (semi.ToString().ToLower().Contains('=')) { string classType = null; classType = (semi.ToString().Split('=')[0]).ToString().Split(' ')[0]; if (TypeTable.TTable.table.ContainsKey(classType)) { List <TypeItem> function_list = new List <TypeItem>(); TypeTable.TTable.table.TryGetValue(classType, out function_list); for (var i = 0; i < function_list.Count; i++) { if (namespacesUsed.Contains(function_list[i].namesp)) { Console.WriteLine(" Dependency : " + function_list[i].file); string fullPathParent = System.IO.Path.GetFileName(currentFile); string fullPathChild = System.IO.Path.GetFileName(function_list[i].file); int parent, child; FileNames.TryGetValue(fullPathChild, out child); FileNames.TryGetValue(fullPathParent, out parent); Graph.setDependency(parent, child); } } } } }
public void parse(Lexer.ITokenCollection semi) { Display.displaySemiString(semi.ToString()); foreach (IRule rule in Rules) { if (rule.test(semi)) { break; } } }
public void parse(Lexer.ITokenCollection semi) { // Note: rule returns true to tell parser to stop // processing the current semiExp Display.displaySemiString(semi.ToString()); foreach (IRule rule in Rules) { if (rule.test(semi)) { break; } } }
public void parse(Lexer.ITokenCollection semi) { // Note: rule returns true to tell parser to stop // processing the current semiExp Display.displaySemiString(semi.ToString()); foreach (IRule rule in Rules) { if (rule.test(semi)) { ////////////////////////////////////////////////////////////////////// // Console.WriteLine("Matched Rule:{0} for {1}", rule,semi); break; } } }