I think @Taoning_Wang has the BSDF parsing library incorporated in his pyradiance tools in case that helps.
-Greg