transform the parsed tree into a list of file pattern to match