Module bf::rle[][src]

Run-length encodes Brainfuck commands.

In bfi by default, this pass runs after parsing and before peephole optimization. To run the output from run-length encoding directly and skip peephole optimization, pass the --rle flag.

This module takes an unoptimized Brainfuck AST and replaces repeated runs of the same command with a run-length encoded instruction.

Enums

Statement

A run-length encoded BF instruction.

Traits

RleCompilable

Program forms that can be compiled to the RLE AST.

Functions

compile

Compiles an unoptimized ast program to a run-length encoded program.

Type Definitions

Program

A run-length encoded BF program is a rose tree of run-length encoded statements.