bfc

bfc

  • Getting Started
  • Optimisations
  • FAQ
  • Changelog

BF Compliance

BF is an underspecified language. Most BF programs just work, but this page documents implementation decisions.

Cell Size

bfc considers cells to be single bytes, and arithmetic wraps around. As a result, - sets cell #0 to 255.

Array Size

bfc provides 100,000 cells. Accessing cells outside of the range #0 to #99,999 is explicitly undefined. It will probably segfault.

bfc will generate a warning if it can statically prove out-of-range cell access.

Brackets

bfc requires brackets to be balanced. +[]] is rejected with a syntax error, unlike some BF interpreters.

Source Code

bfc assumes input files are valid UTF-8.

Sample Programs

Daniel B Cristofani has an excellent selection of BF programs, including several programs explicitly testing implementation robustness.

The Brainfuck Archive also includes a large range of interesting BF programs.

  • Cell Size
  • Array Size
  • Brackets
  • Source Code
  • Sample Programs
User Docs
Getting StartedFAQChangelog
PL Geekery
BF ComplianceOptimisationsTesting
Copyright © 2024 Wilfred Hughes