def treewalk(self, root, parsed, unparsed):
suggestions = dict()<EOL>if not unparsed:<EOL><INDENT>logger.debug("<STR_LIT>", parsed, suggestions)<EOL>return parsed, unparsed, suggestions<EOL><DEDENT>token = unparsed.pop().strip()<EOL>logger.debug("<STR_LIT>", root.node, unparsed)<EOL>if root.node == token:<EOL><INDENT>logger.debug("<STR_LIT>", root.node, token)<EOL>parsed.append(token)<EOL>if self.peekForOption(unparsed):  <EOL><INDENT>logger.debug("<STR_LIT>", unparsed)<EOL>parsed_opts, unparsed, suggestions = self.evalOptions(root, list(), unparsed[:])<EOL>if parsed_opts:<EOL><INDENT>logger.debug("<STR_LIT>", parsed_opts)<EOL>parsed.extend(parsed_opts)<EOL><DEDENT><DEDENT>if unparsed and not self.peekForOption(unparsed):  <EOL><INDENT>logger.debug("<STR_LIT>", root.node)<EOL>for child in root.children:<EOL><INDENT>parsed_subtree, unparsed, suggestions = self.treewalk(child, list(), unparsed[:])<EOL>if parsed_subtree:  <EOL><INDENT>parsed.extend(parsed_subtree)<EOL>logger.debug("<STR_LIT>", child.node, parsed, unparsed)<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>", root.node)<EOL>for child in root.children:<EOL><INDENT>suggestions[child.node] = child.help<EOL><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>unparsed.append(token)<EOL><DEDENT>return parsed, unparsed, suggestions<EOL>
Recursively walks the syntax tree at root and returns
        the items parsed, unparsed and possible suggestions