Implementation of berkeleyparser using Scala