package sgf

  1. Overview
  2. Docs

Module SgfSource

Types

Sourcetype pvalue =
  1. | Empty
  2. | Number of int
  3. | Real of float
  4. | Normal
  5. | Emph
  6. | Black
  7. | White
  8. | Text of string
  9. | Point of char * char
  10. | Move of (char * char) option
  11. | Compose of pvalue * pvalue
Sourcetype pvalues =
  1. | One of pvalue
  2. | List of pvalue list
Sourcetype property = string * pvalues
Sourcetype node = property list
Sourcetype sequence = node list
Sourcetype gametree =
  1. | Node of sequence * gametree list
  2. | Leaf of sequence
Sourcetype collection = gametree list
Sourcetype err =
  1. | Lexing_error of Lexing.position * string
  2. | Parsing_error of Lexing.position

Parsing

Sourceval of_string : string -> (collection, err) Rresult.result
Sourceval of_file : string -> (collection, err) Rresult.result

Printing

Sourceval pp_property : Format.formatter -> property -> unit
Sourceval pp_node : Format.formatter -> node -> unit
Sourceval pp_sequence : Format.formatter -> sequence -> unit
Sourceval pp_gametree : Format.formatter -> gametree -> unit
Sourceval pp_collection : Format.formatter -> collection -> unit