implements newline and spaces parsers