PGN parsers

nbi

Distinguished
Aug 26, 2005
6
0
18,510
Archived from groups: rec.games.chess.computer (More info?)

What is the current state of affairs with regards to PGN parsers? I
took a look at the CPAN Perl PGN Filter module, but it doesn't pass the
self test. Some of the other parsing code I've seen is not very robust
operating correctly only on scrubbed/sanitized input. Are there any
libraries that fully implement the current standard (wherever that may
be found) and have actually been successfully stress test validated?
Thanks in advance.
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On 2005-08-26, nbi@wideopenwest.com <nbi@wideopenwest.com> wrote:

> What is the current state of affairs with regards to PGN parsers? I
> took a look at the CPAN Perl PGN Filter module, but it doesn't pass the
> self test. Some of the other parsing code I've seen is not very robust
> operating correctly only on scrubbed/sanitized input. Are there any
> libraries that fully implement the current standard (wherever that may
> be found) and have actually been successfully stress test validated?
> Thanks in advance.

If you know C++ SCID source code *might* be interesting. It isn't, of
course, a library. pgn-extract is also very interesting but it's not a
library either. There's also a python library by Erik Max Francis and
while it knows the moves and supports SAN it does not support PGN.
I'm using that library as a starting point and my version currently
supports only PGN with no annatation and variations.

--
Ari Makela no escaping it -
hauva@arska.org I must step on fallen leaves
http://arska.org/hauva/ to take this path (Suzuki Majoko)
 

nbi

Distinguished
Aug 26, 2005
6
0
18,510
Archived from groups: rec.games.chess.computer (More info?)

SCID is pre-STD C++ and will require a fair amount of work to use. It's
academic though because SCID is GPL'ed and therefore I can't use it
anyway.

> I'm using that library as a starting point and my version currently supports only PGN with no annatation and variations.

I'm exactly in the same boat as far as annotations and variations. I
wrote a Javascript PGN parser that parses "cleaned" PGN. That's ok for
occasionally presenting a few PGN games via a web page, but for
processing PGN databases that contain annotations and variations it's
inadequate. Given my available options I think I'll just try to
bludgeon my Javascript parser into supporting annotations and
variations.