goatee-0.4.0: A monadic take on a 2,500-year-old board game - library.
Safe HaskellNone
LanguageHaskell2010

Game.Goatee.Lib.Parser

Description

A parser for reading SGF files.

Synopsis

Documentation

parseString :: String -> Either String Collection Source #

Parses a string in SGF format. Returns an error string if parsing fails.

parseFile :: String -> IO (Either String Collection) Source #

Parses a file in SGF format. Returns an error string if parsing fails.

parseSubtree :: RootInfo -> String -> Either String Node Source #

Parses a node as part of an existing game tree, from textual SGF "GameTree" syntax. The RootInfo is needed to supply necessary information from the existing game tree.