Rewrite the foreign import string parser using ReadP