lex.go: Change EOF to eof

Prevent godoc from seeing EOF.
lex.go: Add documentation
lex.go: go fmt fixes