a draft implementation of TxtParser