I now have a javacc grammar for SGF files. It seems to work on the basics, but there are several things it doesn’t do yet, including (a) interpret character set information, (b) interpret handicaps (c) interpret end games and (d) do anything meaningful for comments, annotations or similar.
It has some very basic junit tests, but I need to do something more rigorous. I suspect that I need something to validate it against SGFC. Since SGFC is a c program, I suspect I’ll have to do this using ant or something.