btog bsource [(+|-)Respectcase] [Copyright=bywhom] [+Thinkage] [+Honeywell] [+Bcd] [gmapOptions=opts] [Bstar=object] [Test=compiler]
btog b/4/src/blib/hist.b +Thinkage >gmap.out btog mybe C='by me' +r btog b/4/src/blib/t2741.b +W gopt=nlsou,ndeck
BTOG takes a B source file and converts it to "readable" GMAP. Since GMAP is more restrictive in its use of symbols than B, not all B programs can be translated to GMAP. For the translation to be successful, all the B symbols excluding manifests must be unique within the first six characters. Furthermore, there may not be any case distinctions.
The original B source appears as comments in the output GMAP. "%" includes are processed when the GMAP is produced, but not when the comments are added. This selective inclusion works well when the "%" includes do not contain anything except manifest files, as is normally the case.
The output of BTOG can be captured by using ">" output redirection, and used directly as input to the GMAP assembler. For best results, the B source code put all the external declarations after any function definitions.
BTOG must generate valid symbol names for compiler temporaries. The name ".temp" was chosen for this purpose; thus there cannot be any user defined symbols that conflict with this name.
Copyright © 1996, Thinkage Ltd.