This is in preparation of writing a new parser. Once the new parser is ready then this code can be junked.