parse pgf files