{
Tree tree = parseTree(input);
TreeNodeStream stream = new BufferedTreeNodeStream(tree);
DocumentGenerator generator = new DocumentGenerator(stream);
try {
return generator.document().value;
}
catch (RecognitionException e) {
throw new IllegalArgumentException(e);
}
}