.BSP is nothing to do with Hammer! Hammer editor edits VMF files. VMFs are TEXT files, Declarative format, that contains SHAPES. You can write VMF parser in 10 minutes in C++, if this makes sense. It’s the VBSP tool that parses the VMF and compiles it into CSG binary space partitioned format with lightmaps.