forth

package
v0.0.0-...-3fdb20c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NO_ERROR = iota
	ERR_STACK_UNDERFLOW
	ERR_DIVISION_BY_ZERO
	ERR_REDEF_NUMBER
	ERR_UNDEF_WORD
)
View Source
const (
	I_EXIT = iota
	// integer arithmetic operations
	I_PLUS
	I_MINUS
	I_MULT
	I_DIV
	I_NEG
	I_MOD
	I_ABS
	I_MAX
	I_MIN
	// stack operations
	I_DUP
	I_DROP
	I_DOT
	I_SWAP
	I_OVER
	I_ROT
	I_NIP
	I_TUCK
	I_ROLL
	I_PICK
	// return stack operations
	I_TO_R
	I_FROM_R
	I_R_FETCH
	// dict operations
	I_TICK
	I_EXECUTE

	// compiler operations
	I_COLON
	I_LITERAL
	I_SEMICOLON

	// helpers
	I_DOTS
	I_WORDS
	I_BYE
	I_SEE

	// system variables
	I_STATE
	I_GREATER_THAN_IN

	I_DEREFERENCE

	I_NOOP // must always be last
)

Variables

This section is empty.

Functions

func CreateStack

func CreateStack() *stack

func DoForth

func DoForth()

Types

This section is empty.

Jump to

Keyboard shortcuts

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