Constructor of incremental parsers in Scala