Add support to dump grammar tree.