Based on: http://www.ravenbrook.com/project/mps/master/manual/html/guide/lang.html