bf

package module
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

README

Go Reference

Just another implementation of brainfuck in Go

Cli

go get github.com/amirali/bf/cmd/bf

Lib

go get -u github.com/amirali/bf

WASM

checkout here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrainfuckCompiler

type BrainfuckCompiler struct {
	// contains filtered or unexported fields
}

func NewCompiler

func NewCompiler() *BrainfuckCompiler

func (*BrainfuckCompiler) Clear

func (bf *BrainfuckCompiler) Clear() error

func (*BrainfuckCompiler) Compile

func (bf *BrainfuckCompiler) Compile(program string) error

func (*BrainfuckCompiler) Execute

func (bf *BrainfuckCompiler) Execute(input []byte) error

func (*BrainfuckCompiler) Output

func (bf *BrainfuckCompiler) Output() string

type Instruction

type Instruction struct {
	// contains filtered or unexported fields
}

func (Instruction) String

func (i Instruction) String() string

type Operator

type Operator uint16
const (
	Noop Operator = iota
	Right
	Left
	Increment
	Decrement
	Print
	Read
	BeginLoop
	EndLoop
)

func (Operator) String

func (op Operator) String() string

Directories

Path Synopsis
cmd
bf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL