Crate sgf_parse

Source
Expand description

Data structures and utilities for parsing SGF FF[4] files.

For reading SGFs your starting point will likely be go::parse. For parsing non-go games check out the parse function.

For writing SGFs check out SgfNode::serialize for writing single game trees or serialize for writing whole collections.

Modules§

go
Types specific to the game of Go.
unknown_game
Generic types for SGFs without a known game.

Structs§

ParseOptions
Options for parsing SGF files.
SgfNode
A node in an SGF Game Tree.
SimpleText
An SGF SimpleText value.
Text
An SGF Text value.

Enums§

Color
An SGF Color value.
Double
An SGF Double value.
GameTree
An SGF GameTree value.
GameType
The game recorded in a GameTree.
InvalidNodeError
Err type for SgfNode::validate.
LexerError
Error type for failures to tokenize text.
PropertyType
An SGF property type.
SgfParseError
Error type for failures parsing sgf from text.

Traits§

SgfProp
A type that can be used for properties in an SgfNode.

Functions§

parse
Returns the GameTree values parsed from the provided text using default parsing options.
parse_with_options
Returns the GameTree values parsed from the provided text.
serialize
Returns the serialized SGF text from a collection of GameTree objects.