pass2

package
v0.0.0-...-5710c07 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVisitor

func NewVisitor(p *Pass2) *ast.Visitor

Types

type AddExpHandlerImpl

type AddExpHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewAddExpHandlerImpl

func NewAddExpHandlerImpl(visitor *ast.Visitor, env *Pass2) *AddExpHandlerImpl

NewAddExpHandlerImpl Create a new AddExpHandlerImpl

func (*AddExpHandlerImpl) AddExp

func (p *AddExpHandlerImpl) AddExp(node *ast.AddExp) bool

type CharFactorHandlerImpl

type CharFactorHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewCharFactorHandlerImpl

func NewCharFactorHandlerImpl(visitor *ast.Visitor, env *Pass2) *CharFactorHandlerImpl

NewCharFactorHandlerImpl Create a new CharFactorHandlerImpl

func (*CharFactorHandlerImpl) CharFactor

func (p *CharFactorHandlerImpl) CharFactor(node *ast.CharFactor) bool

type ConfigStmtHandlerImpl

type ConfigStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewConfigStmtHandlerImpl

func NewConfigStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *ConfigStmtHandlerImpl

NewConfigStmtHandlerImpl Create a new ConfigStmtHandlerImpl

func (*ConfigStmtHandlerImpl) ConfigStmt

func (p *ConfigStmtHandlerImpl) ConfigStmt(node *ast.ConfigStmt) bool

type DeclareStmtHandlerImpl

type DeclareStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewDeclareStmtHandlerImpl

func NewDeclareStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *DeclareStmtHandlerImpl

NewDeclareStmtHandlerImpl Create a new DeclareStmtHandlerImpl

func (*DeclareStmtHandlerImpl) DeclareStmt

func (p *DeclareStmtHandlerImpl) DeclareStmt(node *ast.DeclareStmt) bool

type ExportSymStmtHandlerImpl

type ExportSymStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewExportSymStmtHandlerImpl

func NewExportSymStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *ExportSymStmtHandlerImpl

NewExportSymStmtHandlerImpl Create a new ExportSymStmtHandlerImpl

func (*ExportSymStmtHandlerImpl) ExportSymStmt

func (p *ExportSymStmtHandlerImpl) ExportSymStmt(node *ast.ExportSymStmt) bool

type ExternSymStmtHandlerImpl

type ExternSymStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewExternSymStmtHandlerImpl

func NewExternSymStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *ExternSymStmtHandlerImpl

NewExternSymStmtHandlerImpl Create a new ExternSymStmtHandlerImpl

func (*ExternSymStmtHandlerImpl) ExternSymStmt

func (p *ExternSymStmtHandlerImpl) ExternSymStmt(node *ast.ExternSymStmt) bool

type HexFactorHandlerImpl

type HexFactorHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewHexFactorHandlerImpl

func NewHexFactorHandlerImpl(visitor *ast.Visitor, env *Pass2) *HexFactorHandlerImpl

NewHexFactorHandlerImpl Create a new HexFactorHandlerImpl

func (*HexFactorHandlerImpl) HexFactor

func (p *HexFactorHandlerImpl) HexFactor(node *ast.HexFactor) bool

type IdentFactorHandlerImpl

type IdentFactorHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewIdentFactorHandlerImpl

func NewIdentFactorHandlerImpl(visitor *ast.Visitor, env *Pass2) *IdentFactorHandlerImpl

NewIdentFactorHandlerImpl Create a new IdentFactorHandlerImpl

func (*IdentFactorHandlerImpl) IdentFactor

func (p *IdentFactorHandlerImpl) IdentFactor(node *ast.IdentFactor) bool

type ImmExpHandlerImpl

type ImmExpHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewImmExpHandlerImpl

func NewImmExpHandlerImpl(visitor *ast.Visitor, env *Pass2) *ImmExpHandlerImpl

NewImmExpHandlerImpl Create a new ImmExpHandlerImpl

func (*ImmExpHandlerImpl) ImmExp

func (p *ImmExpHandlerImpl) ImmExp(node *ast.ImmExp) bool

type LabelStmtHandlerImpl

type LabelStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewLabelStmtHandlerImpl

func NewLabelStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *LabelStmtHandlerImpl

NewLabelStmtHandlerImpl Create a new LabelStmtHandlerImpl

func (*LabelStmtHandlerImpl) LabelStmt

func (p *LabelStmtHandlerImpl) LabelStmt(node *ast.LabelStmt) bool

type MemoryAddrExpHandlerImpl

type MemoryAddrExpHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewMemoryAddrExpHandlerImpl

func NewMemoryAddrExpHandlerImpl(visitor *ast.Visitor, env *Pass2) *MemoryAddrExpHandlerImpl

NewMemoryAddrExpHandlerImpl Create a new MemoryAddrExpHandlerImpl

func (*MemoryAddrExpHandlerImpl) MemoryAddrExp

func (p *MemoryAddrExpHandlerImpl) MemoryAddrExp(node *ast.MemoryAddrExp) bool

*

  • Handling Exp elements

type MnemonicStmtHandlerImpl

type MnemonicStmtHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewMnemonicStmtHandlerImpl

func NewMnemonicStmtHandlerImpl(visitor *ast.Visitor, env *Pass2) *MnemonicStmtHandlerImpl

NewMnemonicStmtHandlerImpl Create a new MnemonicStmtHandlerImpl

func (*MnemonicStmtHandlerImpl) MnemonicStmt

func (p *MnemonicStmtHandlerImpl) MnemonicStmt(node *ast.MnemonicStmt) bool

type MultExpHandlerImpl

type MultExpHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewMultExpHandlerImpl

func NewMultExpHandlerImpl(visitor *ast.Visitor, env *Pass2) *MultExpHandlerImpl

NewMultExpHandlerImpl Create a new MultExpHandlerImpl

func (*MultExpHandlerImpl) MultExp

func (p *MultExpHandlerImpl) MultExp(node *ast.MultExp) bool

type NumberFactorHandlerImpl

type NumberFactorHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewNumberFactorHandlerImpl

func NewNumberFactorHandlerImpl(visitor *ast.Visitor, env *Pass2) *NumberFactorHandlerImpl

NewNumberFactorHandlerImpl Create a new NumberFactorHandlerImpl

func (*NumberFactorHandlerImpl) NumberFactor

func (p *NumberFactorHandlerImpl) NumberFactor(node *ast.NumberFactor) bool

*

  • Handling Factor elements

type Pass2

type Pass2 struct {
	BitMode          ast.BitMode
	EquMap           map[string]*token.ParseToken
	SymTable         map[string]int32
	GlobalSymbolList []string
	ExternSymbolList []string
	Ctx              *stack.Stack[*token.ParseToken]
	DollarPos        uint32 // $ の位置
	Asm              junkjit.Assembler
}

func (*Pass2) Eval

func (p *Pass2) Eval(program ast.Prog)

type ProgramHandlerImpl

type ProgramHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewProgramHandlerImpl

func NewProgramHandlerImpl(visitor *ast.Visitor, env *Pass2) *ProgramHandlerImpl

NewProgramHandlerImpl Create a new ProgramHandlerImpl

func (*ProgramHandlerImpl) Program

func (p *ProgramHandlerImpl) Program(node *ast.Program) bool

type SegmentExpHandlerImpl

type SegmentExpHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewSegmentExpHandlerImpl

func NewSegmentExpHandlerImpl(visitor *ast.Visitor, env *Pass2) *SegmentExpHandlerImpl

NewSegmentExpHandlerImpl Create a new SegmentExpHandlerImpl

func (*SegmentExpHandlerImpl) SegmentExp

func (p *SegmentExpHandlerImpl) SegmentExp(node *ast.SegmentExp) bool

type StringFactorHandlerImpl

type StringFactorHandlerImpl struct {
	Visitor *ast.Visitor
	Env     *Pass2
}

func NewStringFactorHandlerImpl

func NewStringFactorHandlerImpl(visitor *ast.Visitor, env *Pass2) *StringFactorHandlerImpl

NewStringFactorHandlerImpl Create a new StringFactorHandlerImpl

func (*StringFactorHandlerImpl) StringFactor

func (p *StringFactorHandlerImpl) StringFactor(node *ast.StringFactor) bool

Jump to

Keyboard shortcuts

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