parser

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRLTBlackByCounting = 0
	GRLTWhiteByCounting = 1
	GRLTBlackByResign   = 3
	GRLTWhiteByResign   = 4
	GRLTBlackByTime     = 7
	GRLTWhiteByTime     = 8
)

Variables

This section is empty.

Functions

func Merge

func Merge(sgfs []string) string

func NewGameInfoParser

func NewGameInfoParser(text string) *gameInfoParser

Types

type BaseParser

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

type GIBParser

type GIBParser struct {
	*BaseParser
}

func GIBParserFrom added in v1.11.0

func GIBParserFrom(p *BaseParser) *GIBParser

func NewGIBParser

func NewGIBParser(text string) *GIBParser

func (*GIBParser) Parse

func (p *GIBParser) Parse() (*GIBResult, error)

type GIBResult

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

func (*GIBResult) ToSGFNode

func (g *GIBResult) ToSGFNode() (*SGFNode, error)

type NGFParser added in v1.11.0

type NGFParser struct {
	*BaseParser
}

func NGFParserFrom added in v1.11.0

func NGFParserFrom(p *BaseParser) *NGFParser

func NewNGFParser added in v1.11.0

func NewNGFParser(text string) *NGFParser

func (*NGFParser) Parse added in v1.11.0

func (p *NGFParser) Parse() (*NGFResult, error)

type NGFResult added in v1.11.0

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

func (*NGFResult) ToSGFNode added in v1.11.0

func (r *NGFResult) ToSGFNode() (*SGFNode, error)

type Parser

type Parser struct {
	*BaseParser
}

func New

func New(text string) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (*SGFNode, error)

type SGFNode

type SGFNode struct {
	fields.Fields
	// contains filtered or unexported fields
}

func (*SGFNode) GetChild

func (n *SGFNode) GetChild(i int) *SGFNode

func (*SGFNode) NumChildren

func (n *SGFNode) NumChildren() int

type SGFParser added in v1.11.0

type SGFParser struct {
	*BaseParser
}

func NewSGFParser added in v1.11.0

func NewSGFParser(text string) *SGFParser

func SGFParserFrom added in v1.11.0

func SGFParserFrom(p *BaseParser) *SGFParser

func (*SGFParser) Parse added in v1.11.0

func (p *SGFParser) Parse() (*SGFNode, error)

func (*SGFParser) ParseClean added in v1.11.0

func (p *SGFParser) ParseClean() (*SGFNode, error)

no garbage

Jump to

Keyboard shortcuts

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