Geoff Fortytwo - 2006-05-30

I was looking around for a PGN parser and found Java-Chess. I pulled the latest code from the java-chess module in cvs and then used it to load a pgn file. It always chokes on the first space in the middle of the first ply. For instance, it finds unexpected token at the space in between "f4 d5" in the first move.

I went to a few sites and looked at different pgn files and they all have this problem. Some also have problems with unrecognized header text, but I can just normalize the data by deleting all the header text (anything between square brackets). But, I obviously can't use it if it won't parse the actual moves. Anyone know what the problem might be?

[Event "Aegon, 12th"]
[Site "The Hague"]
[Date "1997.04.22"]
[Round "5"]
[White "COMP Novag Sapphire"]
[Black "Pam, M."]
[Result "1-0"]

1. f4 d5 2. Nf3 g6 3. g3 Bg7 4. Bg2 c5 5. d3 Nc6 6. O-O Nf6 7. Nc3 d4 8. Ne4
Nxe4 9. dxe4 Qb6 10. Qd2 O-O 11. e5 f6 12. exf6 exf6 13. e3 dxe3 14. Qd5+ Kh8
15. Bxe3 Re8 16. Rae1 Bf5 17. Bxc5 Qc7 18. Rxe8+ Rxe8 19. Re1 Rd8 20. Qc4 Qd7
21. c3 Bd3 22. Qa4 Qf5 23. Qa3 g5 24. Be7 Re8 25. Bxf6 Rxe1+ 26. Nxe1 Qxf6 27.
Nxd3 gxf4 28. Bxc6 bxc6 29. Nxf4 Qf7 30. Qb3 Qe7 31. Qb8+ Bf8 32. Ne6 Kg8 33.
Qxf8+ 1-0