The B compiler has not survived (probably).
Here you can find a reconstruction that produces the exact same code as in the binaries that have survived.
bc is the first pass which generates a very simple RPN intermediate language. ba is the second pass which generates threaded code for the PDP-11 assembler. It handles the generation of lvalues, the conditional operator and so on.
The _sym files use symbolic constants which the preprochv1.sh script substitutes for numbers. A poor man's preprocessor.