JavaScript parser for SGF files