wrote a parser for scala