sgf library
Minimal utilities for tokenizing and parsing SGF (Smart Game Format).
The primary entry point is Parser, which converts SGF text into a Node
tree. Token and TokenIterator provide lower-level APIs used by the
parser.
Classes
- Parser
- Lightweight parser that converts SGF into a node tree.
-
Peekable<
E> - Iterator with lookahead capability.
- RecursiveNode
- SGF-specific recursive node used by the parser.
- Token
- Token used while parsing SGF text.
- TokenIterator
- Iterator that turns SGF input text into a stream of tokens.
Enums
- TokenType
- Kinds of tokens recognized in SGF.
Typedefs
- IdGenerator = int Function()
- Callback that generates node IDs (default: 0,1,2,...).
- NodeCallback = void Function(RecursiveNode node)
- Callback invoked whenever a node is finalized/created.