BTOGMAP - convert a B program to GMAP.

Syntax:

btog bsource [(+|-)Respectcase] [Copyright=bywhom]
     [+Thinkage] [+Honeywell] [+Bcd] [gmapOptions=opts]
     [Bstar=object] [Test=compiler]

Examples:

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

Options:

+Respectcase
respects the distinction between upper and lowercase letters. If this is not specified, case is ignored.
Copyright=bywhom
adds a Copyright notice to the output GMAP. "bywhom" specifies the copyrighter. If the "bywhom" string includes blanks, it must be enclosed in single quotes.
+Thinkage
adds a Copyright notice in the name of Thinkage Ltd.
+Honeywell
adds a Copyright notice in the name of Honeywell Information Systems.
+Bcd
translates B source comments to use the $ escape sequences for such non-BCD characters as "{".
gmapOptions=opts
supplies options for the generated $GMAP card. If none are supplied, NDECK is used by default.
Test=compiler
specifies a file containing another version of the B compiler.
Bstar=object
specifies that the source has already been compiled into file "object", and the compiler should not be called.

Description:

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.