mini-c implementation in Scala language