yac

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NLANG = "nlang"
	NCELL = "ncell"
)
View Source
const (
	NPAGE = "npage"
	NHASH = "nhash"
)
View Source
const (
	TRAIN = "train"
	PARSE = "parse"
)
View Source
const MATRIX = "matrix"
View Source
const SCRIPT = "script"
View Source
const YAC = "yac"

Variables

View Source
var Index = &ice.Context{Name: YAC, Help: "语法模块",
	Commands: map[string]*ice.Command{
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
			_yac_load(m.Load())
		}},
		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
			m.Save()
		}},
	},
}

Functions

This section is empty.

Types

type Matrix

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

func NewMatrix

func NewMatrix(m *ice.Message, nlang, ncell int) *Matrix

func (*Matrix) Parse

func (mat *Matrix) Parse(m *ice.Message, rewrite Rewrite, page int, stream *lex.Stream, level int) (hash int, word []string)

type Point

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

type Rewrite

type Rewrite func(m *ice.Message, nhash string, hash int, word []string, begin int, stream *lex.Stream) (int, []string)

type State

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

Jump to

Keyboard shortcuts

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