Documentation
¶
Index ¶
- Constants
- Variables
- func NewHtabCtx() *htabCtx
- func NewLexerCtx() *lexerCtx
- func ParseValue(token []byte) int
- func ReadFile(filename string, extension string) ([]byte, error)
- type Ctx
- type Line
- type Mem
- func (m *Mem) AllRegisterInfos() string
- func (m *Mem) GetFLAGS() int
- func (m *Mem) GetRegisterI32(reg Register) *int
- func (m *Mem) GetRegisterI32Ptr(reg Register) *int
- func (m *Mem) GetRemainder() int
- func (m *Mem) SetRegisterI32(reg Register, v int)
- func (m *Mem) SetRegisterI32Ptr(reg Register, v *int)
- func (m *Mem) StackCreate(size int)
- func (m *Mem) StackPop() *int
- func (m *Mem) StackPush(item *int)
- type Opcode
- type Prog
- type Register
- type Token
Constants ¶
View Source
const ( KEY_LENGTH int = 64 HTAB_SIZE int = 4096 )
View Source
const ( NUM_REGISTERS int = 17 MIN_MEMORY_SIZE int = 64 * 1024 * 1024 /* 64 MB */ )
View Source
const ( TOK_INCLUDE string = "%include" TOK_DEFINE string = "%define" )
View Source
const (
MAX_ARGS int = 2
)
Variables ¶
View Source
var ( ErrorHtabCtxKeyAlreadyExists error = errors.New("htab: key already exists") ErrorHtabCtxKeyNotFound error = errors.New("htab: key not found") )
Functions ¶
func NewHtabCtx ¶
func NewHtabCtx() *htabCtx
func NewLexerCtx ¶
func NewLexerCtx() *lexerCtx
Types ¶
type Mem ¶
type Mem struct { FLAGS int // contains filtered or unexported fields }
func (*Mem) AllRegisterInfos ¶
func (*Mem) GetRegisterI32 ¶
func (*Mem) GetRegisterI32Ptr ¶
func (*Mem) GetRemainder ¶
func (*Mem) SetRegisterI32 ¶
func (*Mem) SetRegisterI32Ptr ¶
func (*Mem) StackCreate ¶
Initialize our stack by setting the base pointer and stack pointer
Click to show internal directories.
Click to hide internal directories.