public bool Parse(System.IO.Stream stream, out Document document) { var tokenizer = new Tokenizer(stream); var tokens = tokenizer.Tokens(); var tokenStream = new Stream(tokens); document = new Document(_host); foreach (var statement in Parse(tokenStream)) { foreach (var s in (statement as StatementList)) { document.Children.Add(s); } } return true; }