gobflib

package
v0.0.0-...-eda6b49 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataPtr = errors.New("Error: Data pointer moved out of bounds (off the beginning)")
View Source
var ErrJumpLocationExceedsCommands = errors.New("Error: Jump location exceeds command locations")
View Source
var ErrReadError = errors.New("Error: Received read error during runtime")
View Source
var ErrUnknownCommand = errors.New("Error: Unknown command in program execution")
View Source
var ErrWriteError = errors.New("Error: Received write error during runtime")

Functions

This section is empty.

Types

type BFProgram

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

BFProgram represents an active program state for a BF program using the the native and unoptimized BF commands.

func NewBFProgram

func NewBFProgram(initialcommandssize, initialdatasize uint64) *BFProgram

func NewIOBFProgram

func NewIOBFProgram(initialcommandssize, initialdatasize uint64, input io.Reader, output io.Writer) *BFProgram

func (*BFProgram) AppendCommand

func (p *BFProgram) AppendCommand(cmd rune)

func (*BFProgram) AppendCommands

func (p *BFProgram) AppendCommands(cmds ...rune)

func (*BFProgram) Clone

func (p *BFProgram) Clone() *BFProgram

func (*BFProgram) CreateILTree

func (p *BFProgram) CreateILTree() *il.ILBlock

func (*BFProgram) PrintProgram

func (p *BFProgram) PrintProgram(outio io.Writer)

func (*BFProgram) ReadCommands

func (p *BFProgram) ReadCommands(in io.Reader)

func (*BFProgram) Reset

func (p *BFProgram) Reset()

func (*BFProgram) Run

func (p *BFProgram) Run() error

func (*BFProgram) RunStep

func (p *BFProgram) RunStep() (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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