Sam parser is reimplemented in Go