Forward port of the 1.8.1 parser