sgf_parse/lib.rs
1//! Data structures and utilities for parsing [SGF FF\[4\] files](https://www.red-bean.com/sgf/).
2//!
3//! For reading SGFs your starting point will likely be [`go::parse`]. For parsing non-go games
4//! check out the [`parse`](`parse()`) function.
5//!
6//! For writing SGFs check out [`SgfNode::serialize`] for writing single game trees or
7//! [`serialize`](`serialize()`) for writing whole collections.
8
9#[macro_use]
10mod prop_macro;
11
12pub mod go;
13pub mod unknown_game;
14
15mod game_tree;
16mod lexer;
17mod parser;
18mod props;
19mod serialize;
20mod sgf_node;
21
22pub use game_tree::{GameTree, GameType};
23pub use lexer::LexerError;
24pub use parser::{parse, parse_with_options, ParseOptions, SgfParseError};
25pub use props::{Color, Double, PropertyType, SgfProp, SimpleText, Text};
26pub use serialize::serialize;
27pub use sgf_node::{InvalidNodeError, SgfNode};