package sgf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Types

type 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
type pvalues =
  1. | One of pvalue
  2. | List of pvalue list
type property = string * pvalues
type node = property list
type sequence = node list
type gametree =
  1. | Node of sequence * gametree list
  2. | Leaf of sequence
type collection = gametree list
type err =
  1. | Lexing_error of Stdlib.Lexing.position * string
  2. | Parsing_error of Stdlib.Lexing.position

Parsing

val of_string : string -> (collection, err) Rresult.result
val of_channel : Stdlib.in_channel -> (collection, err) Rresult.result
val of_file : string -> (collection, err) Rresult.result

Printing

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