Does anyone have a working B compiler?
b-lang, compiler-construction
Solution
Prompted by this question, there is now a B compiler available from here: https://github.com/Leushenko/ybc
Runs on Windows, Linux, and OSX (binaries provided; in the spirit of the question it is written in an obscure language), where it produces very poor quality x86-32 assembly. Should be GCC-compatible. It is reconstructed out of the available reference material on B, and almost certainly does not reflect the language as it really was in the 1960s. Notably, in the absence of type information (B is untyped), the `&a[b] == &*(a + b)` rule can not hold on x86, meaning that this task is effectively impossible (without resorting to an interpreter).
Apart from that, Pavel Minaev's comment is right: the language as described is extremely small, far smaller than C, and an experienced/competent compiler programmer could likely write one for you in an afternoon.
Unfortunately this is only a partial answer, as I couldn't tell you where to find a good B compiler.
Problem
Does anyone know where I could get a good B compiler? I have searched for a B compiler for some time now, but have been having some difficulty finding anything complete for a Windows or Linux system. Here is an example of B: ``` main( ) { auto a, b, c, sum; a = 1; b = 2; c = 3; sum = a+b+c; putnumb(sum); } ```