WIP: implement r3_tree_compile()
WIP: implement r3_tree_match()