braingock

package module
v0.0.0-...-15f8587 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 5 Imported by: 0

README

braingock

A simple brainfuck interpreter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interpreter

type Interpreter[T state.StateType] struct {
	// contains filtered or unexported fields
}

A pair of state and commands list which can be use to compute brainfuck programmes

func NewInterpreter

func NewInterpreter[T state.StateType](
	state state.State[T],
	cmds map[rune]commands.Command[T],
) Interpreter[T]

func (Interpreter[T]) Compute

func (i Interpreter[T]) Compute(source io.ReadCloser) *computation.Computation[T]

func (Interpreter[T]) ComputeWithContext

func (i Interpreter[T]) ComputeWithContext(ctx context.Context, source io.ReadCloser) *computation.Computation[T]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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