adapt parse_trees to support subgroups
update documentation