Parsing SGF files in C#

Posted by mafutrct on Stack Overflow See other posts from Stack Overflow or by mafutrct
Published on 2010-03-31T15:29:56Z Indexed on 2010/03/31 15:33 UTC
Read the original article Hit count: 572

Filed under:
|
|

The text-based Smart Game Format has become the sole file format for exchanging Go game records by now. I stared with disbelieve that there are almost no parsers available. Google yielded a few results in antique Java and Python, but no modern implementations.

I am curious if I have to write my own parser. Do you know of a modern implementation in C# or Java?

In case there really are no parsers available, how should I implement one? Are there general guidelines or tools (in a C# environment) I should know of?

This is an example file:

(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]
RU[Japanese]SZ[19]KM[6.50]
PW[White]PB[Black]
;B[pd]
;W[dc]
;B[dq]
;W[pp]
;B[ce]
(;W[ed]
;B[ci]
;W[kc])
(;W[do]
;B[dl]
;W[gp]
;B[eo]
;W[en]
;B[fo]))

© Stack Overflow or respective owner

Related posts about parse

Related posts about sgf