extended parser to support seeking, and small changes to base parser to support resetting