public string ProcessParseTree(ParserTree tree) { Console.WriteLine(tree); // only continue if the tree is a valid sentence if (!tree.IsValid()) { return NeutralResponse; } string response = string.Empty; bool foundAResponse = false; for (int i = 0; i < _processors.Count && !foundAResponse; i++) { if (_processors[i].TryProcess(tree, out response)) { foundAResponse = true; } } if (!foundAResponse) { response = NeutralResponse; } return response; ////var t = tree.HeadNode.ToString(); ////Console.WriteLine(t); //return "Yay a good one"; }