add parser.parse into api
split exceptions into lexer and grammer errors