Reimplementing primitive parsers