Chapter 4. Applications

Table of Contents
bcompiler
bruntime

bcompiler

Synopsis

The bcompiler is short for butter-compiler and is used to compile butterfly sources into their compiled bytecode form. The input file's ending is removed and replaced with the new suffix ".out". Furthermore it is possible to use the compiler to produce nicely indented printouts of your sourcecode. A few other options for more verbose compilation and adjustment of the compilation process are available as well. Any number of sourcefiles can be processed by a single invocation of the compiler binary.

Compiler invocation

The following options are allowed when invoking the butter compiler:

  • -v be verbose during compilation process.

  • -Ipath add path to the list of paths that are searched for include files. Use multiple -I options to add multiple paths to the include path.

  • -h prints a short help

  • -p prints the parsed source in indented form

  • -t verbosely prints the postfix-typechecking process

  • -f disables constant folding. if disabled then constant arithmetic expressions are not precompiled and replaced by their computed result. please note only pure constant expressions, in their original order of computation, are affected by constant folding anyhow.

  • -s if strict mode is enable, the first error in compilation causes an intermediate exit of the compiler.

  • -M prints some info about the architecture that bcompiler is currently running on and then exits the compiler.

  • -x disable debug-info for variable identifiers in output files.