Description:
DumBeX is a filter, taking lines of B notation on STDIN, and churning out corresponding LaTeX code on STDOUT. This is useful if you are using the B method and need to embed some code in a report: translate just what you need on demand or whole source files automatically.

will put comments in blue instead of using the Bcomment color. See source code, function cl, for more information on command-line arguments.

Notes and restrictions: (in no particular order)

I called it "dumb" because it is a simple regexp script, the initial version of which was hacked in rougly an hour, because I wanted a program to do the job now and didn't have time or motivation to do anything more subtle. There may be other such translators out there, but I couldn't find one on the net when I needed it. 'B' is such a dreadful keyword for internet search...

I used my first afternoon of vacations to extend it to support most B operators.

It is not a parser for B notation. Consequently, while it does the job in most cases, there are things it will never do: for instance, it will never be able to tell the difference between IF-the-keyword and IF-the-set-you-just-defined.

It outputs the LaTeX code for each symbol directly. A more elegant solution would be to output commands defined in an external package, so as to allow the user to redefine some of them in her document. Until then, if you want different symbols, you'll have to change the source code.

If you need any help with it, you are welcome to post here (avoid sending me a mail though).